Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Trellis Histogram

Multiple plots can be placed into a single plot using the lattice package. Here we also illustrate the use of the color option of the histogram function, setting it to FALSE to obtain a transparent background.

[width=0.9]rplot-histogram-trellis


library(lattice)
load("wine.Rdata")
trellis.device(width=7, height=5, new=FALSE, color=FALSE)
with(wine, histogram(~ Alcohol | Type))

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



Copyright © 2004-2006 [email protected]
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.