As an example data set:

set.seed(1)
z.Date <- as.Date(paste(2003, 02, c(1, 3, 7, 9, 14), sep = "-"))
z <- zoo(cbind(left = rnorm(5), right = rnorm(5, sd = 0.2)), z.Date)

tt<-time(z)



fmt<-"%b-%d"

labs<-format(tt,fmt)
plot(z[,1], xlab = "Time", ylab = "")

If I plot the data and don't like the format of the x axis I can do this:

plot(z[,1], xlab = "Time", ylab = "",xaxt="n")

axis(side=1, at=tt[1:5],labels=labs[1:5],cex.axis=0.7)

But if I want to do a stacked plot:

plot(z, xlab = "Time", ylab = "",xaxt="n")
axis(side=1, at=tt[1:5],labels=labs[1:5],cex.axis=0.7)



The axis command has no effect. Can someone explain what is going on and how to 
format a stacked plot like this?


Thanks                                    
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to