I am somewhat new to R and have limited experience with plotting in general. I have been able to work get my data as a time series object in R using zoo, but I am having a
Start with an example:
x.Date <- as.Date(paste(rep(2003:2004, each = 12), rep(1:12, 2), 1, sep = "-"))
x <- zoo(rnorm(24), x.Date)
plot(x)
If we want different tick locations, we can suppress the default axis plotting and add our own:
plot(x, xaxt = "n")
axis(1, at = time(x), labels = FALSE)
Or combine them:
plot(x)
axis(1, at = time(x), labels = FALSE)
You need to specify the locations for the ticks, so if you wanted monthly, weekly, etc values (instead of observations times above), you will need to create the relevant locations (dates) yourself:
## weekly ticks
plot(x)
times <- time(x)
ticks <- seq(times[1], times[length(times)], by = "weeks")
axis(1, at = ticks, labels = FALSE, tcl = -0.3)
See ?axis.Date
for more details, plus ?plot.zoo
has plenty of examples of this sort of thing.