Re: [R] Time series labeling with Zoo

From: Gad Abraham <g.abraham_at_ms.unimelb.edu.au>
Date: Fri 23 Jun 2006 - 17:09:29 EST

Gabor Grothendieck wrote:
> When the axis labelling does not work well you will have to do it yourself
> like this. The plot statement is instructed not to plot the axis and then
> we extract into tt all the dates which are day of the month 1. Then
> we manually draw the axis using those.
>
> library(zoo)
> set.seed(1)
> z <- zoo(runif(10), as.Date("2005-06-01") + 0:380)
>
> plot(z, xaxt = "n")
> tt <- time(z)[as.POSIXlt(time(z))$mday == 1]
> axis(1, tt, format(tt, "%d%b%y"))

Thanks Gabor,

That works nicely.

Cheers,
Gad

-- 
Gad Abraham
Department of Mathematics and Statistics
University of Melbourne
Parkville 3010, Victoria, Australia
email: g.abraham@ms.unimelb.edu.au
web: http://www.ms.unimelb.edu.au/~gabraham

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Jun 23 17:15:03 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 23 Jun 2006 - 20:11:41 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.