Re: [R] Time axis formatting.

2013-08-26 Thread Sudheer Joseph
Thank you. with best regards, Sudheer On Mon, Aug 26, 2013 at 4:36 AM, Jim Lemon wrote: > On 08/26/2013 01:09 AM, Sudheer Joseph wrote: > >> Attached is a plot with a time series. If I have a time series object in >> R. >> How do I get the plot in the attached format of time axis?. When I issue

Re: [R] Time axis formatting.

2013-08-26 Thread Sudheer Joseph
Thank you Jim, I was trying few options but was not able to get it done. Thanks a lot. with best regards, Sudheer On Mon, Aug 26, 2013 at 3:40 AM, jim holtman wrote: > Forgot the year on the plot: > > > n <- 100 > x <- data.frame(time = seq(from = as.Date('2010-1-1')

Re: [R] Time axis formatting.

2013-08-25 Thread Jim Lemon
On 08/26/2013 01:09 AM, Sudheer Joseph wrote: Attached is a plot with a time series. If I have a time series object in R. How do I get the plot in the attached format of time axis?. When I issue plot(ts) I get a time series plot with tic only for years. Hi Sudheer, If your problem is similar t

Re: [R] Time axis formatting.

2013-08-25 Thread jim holtman
Forgot the year on the plot: n <- 100 x <- data.frame(time = seq(from = as.Date('2010-1-1') , to = as.Date('2012-1-1') , length = n ) , val = runif(n) ) plot(x$time, x$val, type = 'l', main = 'Default') # now

Re: [R] Time axis formatting.

2013-08-25 Thread jim holtman
Try this: n <- 100 x <- data.frame(time = seq(from = as.Date('2010-1-1') , to = as.Date('2012-1-1') , length = n ) , val = runif(n) ) plot(x$time, x$val, type = 'l', main = 'Default') # now plot with your own

Re: [R] Time axis formatting.

2013-08-25 Thread jim holtman
There was not attached plot or data. Plot without the x-axis (probably xaxt = 'n') and then use "axis" to create your own ticks. It would be helpful if you had supplied data using 'dput'. On Sun, Aug 25, 2013 at 11:09 AM, Sudheer Joseph wrote: > Attached is a plot with a time series. If I hav

[R] Time axis formatting.

2013-08-25 Thread Sudheer Joseph
Attached is a plot with a time series. If I have a time series object in R. How do I get the plot in the attached format of time axis?. When I issue plot(ts) I get a time series plot with tic only for years. -- with best regards Sudheer *