Consider the (simplistic) version of this zoo object:
d <- c("2007-01-31", "2007-02-28", "2007-03-31", "2007-04-30", "2007-05-31", "2007-06-30", "2008-02-28", "2008-03-31", "2008-04-30", "2009-09-30", "2009-10-31", "2009-11-30", "2009-12-31", "2010-01-31")
vec <- runif(14, 0.5, 0.7)
vec.zoo = zoo(vec, order.by = as.Date(d, format = "%Y-%m-%d"))
plot(vec.zoo, ylim = c(0,1))
As you can see, some dates are missing (look at the index d). However, when I plot the object, I get the following:
I realize that this is feasible with ggplot
, however the outcome is multiple plots instead of one (See thread: link)
I would like to be able to draw the zoo object in a one plot, but by leaving a blank space in the plot when no data is available for a specific date. How can I do that?
Thanks!