Displaying 20 results from an estimated 700 matches similar to: "Adding Year-Month-Day to X axis"
2018 May 08
0
Adding Year-Month-Day to X axis
abline (v=x_yyyymmdd, lty=3, lwd=1.0, col="blue")
On Tue, May 8, 2018 at 5:23 PM, Gregory Coats <gregcoats at me.com> wrote:
> Since the horizontal axis side=1 is year-month-day, how do I issue an
> abline command to draw dashed vertical lines, as a background grid, within
> the graph?s border? Similar to the abline command I call below, in blue,
> for dashed
2018 May 08
2
Adding Year-Month-Day to X axis
Since the horizontal axis side=1 is year-month-day, how do I issue an abline command to draw dashed vertical lines, as a background grid, within the graph?s border? Similar to the abline command I call below, in blue, for dashed horizontal lines, as a background grid.
Greg
y_duration <- c (301.59050, 387.35700, 365.64366, 317.26150, 321.71883, 342.44950, 318.95350, 322.33233, 330.60333,
2018 May 07
2
Adding Year-Month-Day to X axis
Jim,
Thank you very much!
How do I use the axis command for side=1 to label the x horizontal axis, in the format="%Y-%m-%d? style?
Greg
y_duration <- c (301.59050, 387.35700, 365.64366, 317.26150, 321.71883, 342.44950, 318.95350, 322.33233, 330.60333, 428.99516, 297.82066, 258.23166)
x_yyyymmdd <-as.Date(c ("2018-04-25", "2018-04-26",
2018 May 08
1
Adding Year-Month-Day to X axis
I do not see any difference between the x versus y plot drawn in blue, and the y only plot drawn in red. Is the correct?
Greg
y_duration <- c (301.59050, 387.35700, 365.64366, 317.26150, 321.71883, 342.44950, 318.95350, 322.33233, 330.60333, 428.99516, 297.82066, 258.23166, 282.01816, 280.00000)
x_yyyymmdd <-as.Date(c ("2018-04-25", "2018-04-26", "2018-04-27",
2018 May 09
1
Adding Year-Month-Day to X axis
Helo Greg - I got it with help of your code and I would like to add the value into the boxplot chart. How to do that.
y_duration <- c (16.438, 15.321, 12.700, 12.397,
10.795, 9.928, 10.386)
On May 09, 2018, at 10:06 AM, Jayaganesh Anbuganapathy <jai6561 at icloud.com> wrote:
Actually I would like to get an output on the below snapshot. I have tried various method like points,
2018 May 06
2
Adding Year-Month-Day to X axis
Jim,
That you very much!
How do I instruct staxlab to label once every n days, rather than labeling every day?
Greg
> On May 5, 2018, at 6:50 PM, Jim Lemon <drjimlemon at gmail.com> wrote:
>
> staxlab(1,at=x_yyyymmdd,labels=format(x_yyyymmdd,"%Y-%m-%d"))
[[alternative HTML version deleted]]
2018 May 06
0
Adding Year-Month-Day to X axis
Hi Greg,
By default, the "axis" function puts the labels on one line and drops
labels that would overlap. When you have labels that are all the same
length, this usually results in every second, or third, or fourth
label being displayed. So you can probably get what you want by not
using staxlab. However, if you really want to use staxlab, try this:
2018 May 07
2
Adding Year-Month-Day to X axis
Thanks. Regarding
axis(1,at=x_yyyymmdd,labels=format(x_yyyymmdd,"%Y-%m-%d"))
How do I get the text for YYYY-MM-DD to be drawn vertically, instead of horizontally?
Greg
> On May 6, 2018, at 11:54 PM, Jim Lemon <drjimlemon at gmail.com> wrote:
>
> axis(1,at=x_yyyymmdd,labels=format(x_yyyymmdd,"%Y-%m-%d"))
[[alternative HTML version deleted]]
2018 May 05
0
Adding Year-Month-Day to X axis
Hi Greg,
What you are getting there is a factor, interpreted as a 1:n sequence
based on the sort order of your "dates". Here's a way to get dates on
your x-axis in the format you want:
x_yyyymmdd<-as.Date(c("2018-04-25","2018-04-26","2018-04-27",
2018 May 07
0
Adding Year-Month-Day to X axis
Look at par(las=2) in the graphics package. You will almost certainly
have to increase the bottom margin, e.g.:
par(mar=c(6,4,4,2)
to accomodate the vertical labels.
Jim
On Mon, May 7, 2018 at 2:11 PM, Gregory Coats <gregcoats at me.com> wrote:
> Thanks. Regarding
> axis(1,at=x_yyyymmdd,labels=format(x_yyyymmdd,"%Y-%m-%d"))
>
> How do I get the text for YYYY-MM-DD
2018 May 07
0
Adding Year-Month-Day to X axis
Hi Greg,
Easy:
plot (x_yyyymmdd, y_duration, type="l", xaxt="n", yaxt="n",
ylim=range(240,480))
abline (h=c(240,270,300,330,360,390,420,450,480,510,540), lty=2,
lwd=1.0, col="grey40")
axis(1,at=x_yyyymmdd,labels=format(x_yyyymmdd,"%Y-%m-%d"))
2018 May 05
1
Adding Year-Month-Day to X axis
Jim, Thanks for responding!
I am using the official R 3.5.0 for Mac OS X.
This apparently does not include library (plotrix)
library(plotrix)
Error in library(plotrix) : there is no package called ?plotrix?
Greg
> On May 5, 2018, at 6:50 PM, Jim Lemon <drjimlemon at gmail.com> wrote:
>
> Hi Greg,
> What you are getting there is a factor, interpreted as a 1:n sequence
>
2018 May 08
0
Adding Year-Month-Day to X axis
Hi Greg,
This is because both plots have equally spaced x values. To see the
difference, try this:
plot (x_yyyymmdd, y_duration, type="l", xaxt="n", yaxt="n",
ylim=range(240,480), xlab="", ylab="", col="blue")
axis(1)
plot ( y_duration, type="l", xaxt="n", yaxt="n",
ylim=range(240,480),
2018 May 09
0
Adding Year-Month-Day to X axis
Actually I would like to get an output on the below snapshot. I have tried various method like points, labels.. but nothing works. Attached is the data for your reference.
On May 09, 2018, at 09:59 AM, Gregory Coats <gregcoats at me.com> wrote:
I do not see any difference between the x versus y plot drawn in blue, and the y only plot drawn in red. Is the correct?
Greg
y_duration <- c
2018 May 05
0
Adding Year-Month-Day to X axis
Hi Greg,
The only reason I included the staxlab function in the plotrix library
was to fit all the dates onto the axis. If you want to try it:
install.packages("plotrix")
Jim
On Sun, May 6, 2018 at 9:02 AM, Gregory Coats <gregcoats at me.com> wrote:
> Jim, Thanks for responding!
> I am using the official R 3.5.0 for Mac OS X.
> This apparently does not include library
2012 Feb 02
1
"shifted" bar chart / battleship curve
What I want to do is create a horizontal bar chart matrix for a set of data that have a common set of variables (e.g., % of As, % of Bs, etc.) listed on the Y-axis and groups (e.g., Classes) on the X-axis. The key here is that the bars for each individual class plot are "centered" rather than left or right-justified. In archaeology plots similar to this are called battleship curves or
2006 Apr 24
2
boxplots instead of a scatterplot
Dear R list,
I am a newbie to R and programming itself, so my question may be easy to
answer for you.
I wanted to create a scatterplot and i used the following code:
par(mar=c(10, 4.1,4.1,2.1))
plot(q$location,q$points, , las=2, cex.axis=0.5,xlab="", ylab="" )
#location are character strings, there are about 70 locations
#points are numeric, there are more than 4 points for
2017 Jul 13
1
How to make a figure plotting p-values by range of different adjustment values?
Hi Jim,
Thanks for your help, I really appreciate it.
Perhaps I'm misunderstanding, but does this formula run different ajustment
values for this function?
logit(p = doc$value, adjust = 0.025)
I'm looking to plot the p-values of different adjustment values.
Thanks so much,
Kirsten
On Wed, Jul 12, 2017 at 8:49 PM, Jim Lemon <drjimlemon at gmail.com> wrote:
> Hi Kirsten,
2010 Sep 21
2
labels in (box)plot
Dear users,
I would like all the ticks on a boxplot (x and y) to be labeled
I have checked all the par() arguments but couldn't find what I'm
looking for
Here is an example to show it:
df <- structure(list(SPECSHOR = structure(c(1L, 1L, 1L, 3L, 3L, 3L, 3L,
3L, 4L, 4L), .Label = c("cotau", "dibic", "eqgre", "gicam"), class =
2009 Jun 08
4
increase number of ticks on x axis of dates
My x axis is a series of daily dates (e.g., 01/01/2000, 01/02/2000,
etc.) from 2000 to end of 2008. The default only gives me 4 ticks. I
want more. Why doesn't this work?
sdate<-as.POSIXct(strptime(date,format="%m/%d/%Y"))
plot(ppt~sdate,type="l",ylim=c(0,47),col=1,lwd=1,pch=16,ylab="Salinity,
psu",xlab="Year",las=1,main="Duck Key