Skip to content
Prev 31260 / 398525 Next

Windows metafiles from lattice plots

Tautz, Art WLAP:EX wrote:
How about this?

library(lattice)

set.seed(100)
dframe <- data.frame(y = rnorm(100),
                      x = rnorm(100),
                      g = rep(1:4, 25))
win.metafile(width = 10,
              height = 7.5,
              file = "rplot%02d.wmf")
lset(col.whitebg())
print(xyplot(y ~ x | g,
              data = dframe,
              layout = c(1, 1)))
dev.off()

regards,
sundar