Re: [R] xyplot.zoo question about strip.left and layout

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Mon, 09 Jun 2008 14:20:57 -0400

Or perhaps this way is more logical since it takes the names from the screens:

test2<-xyplot(z, as.table=TRUE , screens = colnames(z), strip=FALSE , strip.left = TRUE, layout=c(1,3,2))

On Mon, Jun 9, 2008 at 2:10 PM, Gabor Grothendieck <ggrothendieck_at_gmail.com> wrote:
> Try:
>
> strip.left = strip.custom(factor.levels = colnames(z))
>
>
> On Mon, Jun 9, 2008 at 12:18 PM, Klaus Nordhausen <klausch_at_gmx.de> wrote:
>> Dear R masters,
>>
>> I have large multivariate time series as zoo objects and want to plot them using lattice.
>>
>> Since I have many variates in one object I would like to have the strips on the left, using strip.left = TRUE. However when I use this the variable names are converted into numbers. How can I keep there the original variable names? (compare test1 and test2 in example below)
>>
>> Furthermore would I like to print one object using several pages, having only one column - I have however not always a "nice" number of panels (variables) and then often on the last page there is a huge gap between the last drawn panel and the axis label. How can that be avoided?
>>
>> Short example:
>>
>> library(zoo)
>> library(lattice)
>>
>> set.seed(1)
>> z <- zoo(cbind(a = 1:5, b = 11:15, c = 21:25, d = 31:35, e = 41:45) + rnorm(5))
>>
>> test1<-xyplot(z, as.table=TRUE , strip=TRUE , strip.left=FALSE , layout=c(1,3,2))
>> test2<-xyplot(z, as.table=TRUE , strip=FALSE , strip.left=TRUE , layout=c(1,3,2))
>>
>> trellis.device(device="pdf", color = FALSE, file="test_z.pdf",
>> paper="a4" ,width = 6, height =10 )
>> print(test2)
>> dev.off()
>>
>> Thanks already in advance!
>>
>> Klaus
>>
>> PS: I use R 2.7.0 on windows XP and lattice_0.17-8 and zoo_1.5-3.
>>
>>
>> --
>>
>> ______________________________________________
>> 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. Received on Mon 09 Jun 2008 - 18:49:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 09 Jun 2008 - 19:30:37 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive