Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Multiple Dot Plots

Image 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 © Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
The PDF version is a formatted comprehensive draft book (with over 800 pages).
Brought to you by Togaware. This page generated: Sunday, 22 August 2010