Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Multiple Dot Plots

[width=0.7]rplot-trellis


# Suggested by Michael Friendly
pdf("graphics/rplot-trellis.pdf")
  library(lattice)
  data(barley)
  n <- length(levels(barley$year))
  trellis.device(new = FALSE, theme = col.whitebg())
  dotplot(variety ~ yield | site, 
    data = barley, groups = year,
    layout = c(2, 3), aspect = .5,
    xlab = "Barley Yield (bushels/acre)",
    key = list(points = Rows(trellis.par.get("superpose.symbol"),1:n),
    text = list(levels(barley$year)), columns = n))
dev.off()

http://rattle.togaware.com/code/rplot-trellis.R



Copyright © 2004-2006 Graham.Williams@togaware.com
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.