[R] Multi-Row Lattice Plot With Y Axis on Same Side

Duncan Mackay mackay at northnet.com.au
Tue May 19 05:33:34 CEST 2009


A toy example which you omitted
dat <- data.frame(x = rep(1:10,2),y = rnorm(20), gp = rep(letters[1:2], 
each=10) )

xyplot(y~x|gp,dat, scales = list(y = list("alternating" = 3)))

see ? xyplot and scales

a slimmed down
R version 2.8.1 (2008-12-22)

attached base packages:
[1] datasets  utils     stats     graphics  grDevices 
grid      methods   base

other attached packages:
[1] R.oo_1.4.6        R.methodsS3_1.0.3 
foreign_0.8-34    chron_2.3-30      MASS_7.2-46       lattice_0.17-20



Duncan Mackay
Department of Agronomy and Soil Science
University of New England

At 09:50 19/05/2009, you wrote:

>Hi Everyone,
>I have been creating a lattice plot with the layout = c(1,2).  For some
>reason my boss wants the Y axis of both plots to be on the left hand side of
>the graph.  Is there a way to do this?
>View this message in context: 
>Sent from the R help mailing list archive at Nabble.com.
>R-help at r-project.org mailing list
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list