From R-help: Hi, Using library(lattice), is there any way to tell xyplot to plot panels top to bottom, then left to right (i.e. panels are appended vertically, then horizontally). as.table changes the plot direction from left-to-right then top-to-bottom, to right-to-left then bottom- to-top, but that's not quite what I want to do. Thanks Yan
Deepayan says:
> tmp.tr3 <- xyplot(y ~ x | a, data=tmp, as.table=TRUE)Another high level option is to change the rule determining how packets are chosen for a given panel in the layout.
print(tmp.tr3, packet.panel = function(layout, row, column, ...) { layout <- layout[c(2, 1, 3)] packet.panel.default(layout = layout, row = column, column = row, ...) })This effectively transposes the layout, which (along with as.table=TRUE) is what you want.
-Deepayan
No comments:
Post a Comment