Skip to content

Windows metafiles from lattice plots

2 messages · Tautz, Art WLAP:EX, Sundar Dorai-Raj

#
Could  someone please tell me if it is possible to automate the production
of a series of windows metafiles for each page of a multipage trellis plot?
The problem is  that I have a number of conditioned plots, each  consisting
of 1-30 individual conditioned regressions for each of 20-30 subsets of a
factor. The graphics work as expected, with each page consistent with the
layout specified for each factor.   However, if I attempt to automate the
creation  of a wmf for each page, I only get a portion of the output. 

Any help would be greatly appreciated 

Art Tautz
#
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