I have a zoo object that looks like this:
z <- structure(c(6, 11, 3.6, 8.4, 8.9, 0, NA, 0.5, 7, NA, 9, NA),
.Dim = c(6L, 2L), .Dimnames = list(NULL, c("2234", "2234.1")), index = structure(c(-17746, -17745, -17744, -17743, -17742, -17741), class = "Date"),
class = "zoo")
I tried using a grid to plot both columns simultaneously in two different panels:
xyplot(z)
This gives me the same x axis for both panels, but different from ylim. I want them to have the same name, so I tried it xyplot(z, ylim=range(z[,1])), it didn’t do anything, therefore, after reading "Plot zoo Series with Lattice", I tried it trellis.focus("panel", 2,1,ylim=range(z[,1]))too without any luck ...
This is probably easy to do, but I find the lattice package very difficult to use (at least for starters). Can anyone help?
Thank!