[R] lattice help required

Kay Cichini Kay.Cichini at uibk.ac.at
Wed Aug 25 19:50:03 CEST 2010


... i added relation="free" to account for diffferent ranges of y1 and y2:

dotplot(y1+y2 ~ facs$Treatment|facs$Sites,
         outer=TRUE,
         scales = list(y = list(relation="free"), x = list(rot = 90,
tck=c(1,0))),
         ylab=c("y1", "y2"),
         xlab=c("Site 1", "Site 2"),
         strip=FALSE)  

but then i get four different y-lims.
more suited there should be only two - one for each response.
can someone tell me how i have to change the code?

best,
kay



> Kay,
>
> doe this do what you want?
>
>
> dotplot(y1+y2 ~ facs$Treatment|facs$Sites,
>         outer=TRUE,
>         scales = list(x = list(rot = 90, tck=c(1,0))),
>         ylab=c("y1", "y2"),
>         xlab=c("Site 1", "Site 2"),
>         strip=FALSE)
>
>
> On Wed, Aug 25, 2010 at 11:04 AM, Kay Cichini
> <Kay.Cichini at uibk.ac.at>wrote:
>
>>
>> hello,
>>
>> i want to stack two lattice plots beneath each other using one x-axis and
>> sharing the same text-panels,
>> like:
>> #####################################################################
>> library(lattice)
>>
>> y1 <- rnorm(100,100,10)
>> y2 <- rnorm(100,10,1)
>> facs<-expand.grid(Sites=rep(c("Site I","Site
>> II"),25),Treatment=c("A","B"))
>> pl1<-dotplot(y1 ~ facs$Treatment|facs$Sites,
>>             scales = list(x = list(rot = 90, tck=c(1,0))))
>> pl2<-dotplot(y2 ~ facs$Treatment|facs$Sites,
>>             scales = list(x = list(rot = 90, tck=c(1,0))))
>>
>> print(pl1, split=c(1,2,1,2), more=TRUE)
>> print(pl2, split=c(1,1,1,2))
>> #####################################################################
>>
>> but as said, ideally the plots should be stacked with only the lower plot
>> giving the x-axis annotation
>> and only the upper plot with text-panels.
>>
>> thanks a lot,
>> kay
>>
>> -----
>> ------------------------
>> Kay Cichini
>> Postgraduate student
>> Institute of Botany
>> Univ. of Innsbruck
>> ------------------------
>>
>> --
>> View this message in context:
>> http://r.789695.n4.nabble.com/lattice-help-required-tp2338382p2338382.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<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.




-----
------------------------
Kay Cichini
Postgraduate student
Institute of Botany
Univ. of Innsbruck
------------------------

-- 
View this message in context: http://r.789695.n4.nabble.com/lattice-help-required-tp2338382p2338641.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list