Hi all,

I am trying to pickup lattice graphics in R and having difficulty with
simple layout of plots.

I have created a series of levelplots and would like to plot them to a
single device, but need to reduce the margin areas.  This is easily
accomplished with par(oma) and par(mar) in the base graphics package but I
am having problems finding the equivalent features in the lattice package.
Ideally, I would like to reduce the amount of white space among plots in the
following example. Thanks in advance.

library(lattice)
p1 <- levelplot( matrix(c(1:25),nr=5,nc=5),row.values=1:5,column.values=1:5)
p2 <- levelplot(matrix
(rnorm(25),nr=5,nc=5),row.values=1:5,column.values=1:5)
p3 <- levelplot( matrix(c(1:25),nr=5,nc=5),row.values=1:5,column.values=1:5)
p4 <- levelplot(matrix
(rnorm(25),nr=5,nc=5),row.values=1:5,column.values=1:5)

print(p1,split=c(1,1,2,2),more=T)
print(p2,split=c(2,1,2,2),more=T)
print(p3,split=c(1,2,2,2),more=T)
print(p4,split=c(2,2,2,2))

Best

Jonathan

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to