In plot.zoo the screens and ylim arguments seem incompatible
Hi Gabor,
It seems that the problem depends on operating system.
I have recently switched from using R on Windows Vista to using it on Ubuntu
Linux.
I had already tried your two suggestions on Ubuntu and they produce the same
error:
Error in ylim[[idx]] : subscript out of bounds
According to debug(), the error occurs in the second tapply in the
definition of "ranges".
I traced it up to the Internal lapply and couldn't see any reason why the
error should occur.
On the other hand, your suggestions work on Windows.
Also, the broken command still doesn't work on Windows.
But, it produces an entirely different error message:
Error in plot.window(...) : need finite 'ylim' values
thanks, Scott
Gabor Grothendieck wrote:
Thanks for the bug report. In the interim these two (and variations work): plot(z, screens=c(1,2,2), ylim = c(1, 40)) plot(z, screens=c(1,2,2), ylim = list(c(1, 40), c(1, 40), c(1, 40))) On Thu, Apr 2, 2009 at 3:41 PM, Scott Tennican <lextrounce at yahoo.com> wrote:
I am plotting multiple graphs per window with multiple series on each graph. When I try to set ylim I get the error below: Error in ylim[[idx]] : subscript out of bounds Am I incorrectly specifying my ylim list or is this a bug? Here is a simple reproduction: z <- zoo(cbind(a = 1:10, b = 11:20, c = 21:30)) # This works plot(z, ylim = list(a = c(1,40))) # This works plot(z, screens=c(1,2,2)) # This produces the error plot(z, screens=c(1,2,2), ylim = list(a = c(1,40))) thanks, Scott -- View this message in context: http://www.nabble.com/In-plot.zoo-the-screens-and-ylim-arguments-seem-incompatible-tp22855560p22855560.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at 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.
______________________________________________ R-help at 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.
View this message in context: http://www.nabble.com/In-plot.zoo-the-screens-and-ylim-arguments-seem-incompatible-tp22855560p22874004.html Sent from the R help mailing list archive at Nabble.com.