R Plot Specify number of time tickmarks

Posted by Cookie on Stack Overflow See other posts from Stack Overflow or by Cookie
Published on 2011-07-06T06:57:15Z Indexed on 2012/07/05 9:16 UTC
Read the original article Hit count: 145

Filed under:
|
|

I was wondering how I could plot more tick marks when plotting time on the x-axis.

Basically, a time equivalent to pretty. Pretty obviously doesn't work so well with times, as it uses factors of 1,2,5 and 10. For time one probably wants e.g. hours, half hours, ...

plot(as.POSIXct(x,origin="1960-01-01"),y,type="l",xlab="Time")

gives really too few and widely spaced tickmarks.

zoox<-zoo(y,as.POSIXct(stats$Time,origin="1960-01-01"))
plot(zoox)

gives the same.

Thanks

© Stack Overflow or respective owner

Related posts about r

    Related posts about plot