[R] Panels order in lattice graphs

Mark Difford mark_difford at yahoo.co.uk
Thu May 5 08:59:01 CEST 2011


May 04, 2011; 5:50pm Cristina Silva wrote:

> In lattice graphs, panels are drawn from left to right and bottom to 
> top. The flag "as.table=TRUE" changes to left to right and top to 
> bottom. Is there any way to change to first top to bottom and then left 
> to right? didn´t find anything neither in Help pages nor Lattice book.

Cristina,

You have not fully explained your problem. An approach I use for
difficult-to-get-right arrangements is the following. Say you have two
conditioning variables (13 panels in all) and you want to place the last
panel on the top row in the first position on the bottom row, but leave
everything else the same, then easiest is the following:

## Note: T.xyplot$index.cond is a __list__, so you need to use [[
T.xyplot <- xyplot(Prop ~ OM | interaction(Treatment, Aspect, drop = TRUE),
data = myDat)
print(T.xyplot)
> T.xyplot$index.cond
[[1]]
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13

T.xyplot$index.cond[[1]] <- c(13, 1:12)
print(T.xyplot)

Hope this helps to solve your problem.

Regards, Mark.





-----
Mark Difford (Ph.D.)
Research Associate
Botany Department
Nelson Mandela Metropolitan University
Port Elizabeth, South Africa
--
View this message in context: http://r.789695.n4.nabble.com/Panels-order-in-lattice-graphs-tp3496022p3497691.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list