Hi All,

Can anyone please help me with getting a "single title" and "legend" for
both the plots in the following R code. I'll eventually be using .wmf file.

# R code:
library(lattice)
p1 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
       type = "a", main="Same title / legend",
       auto.key = list(space = "right", points = FALSE, lines = TRUE))
p2 <- xyplot(decrease ~ treatment, OrchardSprays, groups = rowpos,
       type = "a", main="Same title / legend",
       auto.key = list(space = "right", points = FALSE, lines = TRUE))

win.metafile("Rplot%02d.wmf", width=12, height=8)
print(p1, split=c(1,1,2,2), more=TRUE)
print(p2, split=c(1,2,2,2), more=TRUE)
print(p1, split=c(2,1,2,2), more=TRUE)
print(p2, split=c(2,2,2,2))
dev.off()

Thanks in advance,
Kim

        [[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