Skip to content

Multiple xyplots on the same page

2 messages · Liaw, Andy, Sundar Dorai-Raj

#
Sorry, that's beyond me.  I've never tried that myself.

Andy

From: Ravi Varadhan
#
Hi, Ravi,

How are you creating the legend? Here's a trivial example where you can 
add a cex argument to "auto.key":

library(lattice)
trellis.par.set(theme = col.whitebg())
xy <- xyplot(decrease ~ treatment, OrchardSprays,
              groups = rowpos, type = "a",
              auto.key = list(x = 0.2, y = 0.9,
                cex = 0.75, points = FALSE, lines = TRUE))

print(xy, pos = c(0.0, 0.0, 0.5, 0.5), more = TRUE)
print(xy, pos = c(0.0, 0.5, 0.5, 1.0), more = TRUE)
print(xy, pos = c(0.5, 0.0, 1.0, 0.5), more = TRUE)
print(xy, pos = c(0.5, 0.5, 1.0, 1.0), more = FALSE)

HTH,

--sundar
Liaw, Andy wrote: