Jim Rogers
2002-Dec-06 15:45 UTC
[R] Mutiple page trellis plots with relation = "free" or "sliced"
Hello, Has anyone out there encountered a problem like this: xyplot(Plasma ~ Serum | Analyte, data = sp.df, aspect = 1, layout = c(1, 1, 200), scales = list(relation = "free") ) Gives the error: Error in pretty(x[is.finite(x)], ...) : x must be numeric On the other hand, this works (but I don't want the default of having everything on the same page): xyplot(Plasma ~ Serum | Analyte, data = sp.df, aspect = 1, # layout = c(1, 1, 200), scales = list(relation = "free") ) and this works (but I don't want the default of using the same axes limits for all plots): xyplot(Plasma ~ Serum | Analyte, data = sp.df, aspect = 1, layout = c(1, 1, 200) # scales = list(relation = "free") ) For my present situation, I can work around this by creating multiple plots in a loop, but I am wondering if I am missing something about the way multi-page plots work. Thanks for any help. platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 6.1 year 2002 month 11 day 01 language R Jim Rogers James A. Rogers, Ph.D. <rogers at cantatapharm.com> Statistical Scientist Cantata Pharmaceuticals 3-G Gill St Woburn, MA 01801 617.225.9009 Fax 617.225.9010
Deepayan Sarkar
2002-Dec-06 19:54 UTC
[R] Mutiple page trellis plots with relation = "free" or "sliced"
On Friday 06 December 2002 08:44 am, Jim Rogers wrote:> Hello, > > Has anyone out there encountered a problem like this: > > xyplot(Plasma ~ Serum | Analyte, > data = sp.df, > aspect = 1, > layout = c(1, 1, 200), > scales = list(relation = "free") > ) > > Gives the error: > > Error in pretty(x[is.finite(x)], ...) : x must be numeric > > On the other hand, this works (but I don't want the default of having > everything on the same page): > > xyplot(Plasma ~ Serum | Analyte, > data = sp.df, > aspect = 1, > # layout = c(1, 1, 200), > scales = list(relation = "free") > ) > > and this works (but I don't want the default of using the same axes > limits for all plots): > > xyplot(Plasma ~ Serum | Analyte, > data = sp.df, > aspect = 1, > layout = c(1, 1, 200) > # scales = list(relation = "free") > ) > > For my present situation, I can work around this by creating multiple > plots in a loop, but I am wondering if I am missing something about the > way multi-page plots work.No, this is supposed to work. I'm not sure where the problem might be, but it could have something to do with panels without any data in them. Does that happen in your case ?> Thanks for any help. > > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 1 > minor 6.1 > year 2002 > month 11 > day 01 > language R > > Jim Rogers > > James A. Rogers, Ph.D. <rogers at cantatapharm.com> > Statistical Scientist > Cantata Pharmaceuticals > 3-G Gill St > Woburn, MA 01801 > 617.225.9009 > Fax 617.225.9010 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help
Jim Rogers
2002-Dec-06 20:22 UTC
[R] Mutiple page trellis plots with relation = "free" or "sliced"
Yes. The number of pages in my layout argument (200) was greater than the number of unique values in my conditioning variable (168). Changing to layout = c(1, 1, 168) solves the problem. Very sorry, I should have thought of that. Thanks so much for your response, and many, many thanks for implementing lattice. It is incredibly powerful and a joy to use. Jim -----Original Message----- From: Deepayan Sarkar [mailto:deepayan at stat.wisc.edu] Sent: Friday, December 06, 2002 1:55 PM To: Jim Rogers; r-help at stat.math.ethz.ch Subject: Re: [R] Mutiple page trellis plots with relation = "free" or "sliced" On Friday 06 December 2002 08:44 am, Jim Rogers wrote:> Hello, > > Has anyone out there encountered a problem like this: > > xyplot(Plasma ~ Serum | Analyte, > data = sp.df, > aspect = 1, > layout = c(1, 1, 200), > scales = list(relation = "free") > ) > > Gives the error: > > Error in pretty(x[is.finite(x)], ...) : x must be numeric >No, this is supposed to work. I'm not sure where the problem might be, but it could have something to do with panels without any data in them. Does that happen in your case ?