Togaware DATA MINING
Desktop Survival Guide
by Graham Williams
Google

Practical Histogram

Suppose we are interested in the distribution of the Alcohol content in the wine dataset. The numeric values are grouped by hist into intervals and the bars represent the frequency of occurrence of each interval as a height. A rug is added to the plot, just above the x-axis, to illustrate the density of values.




pdf('graphics/rplot-hist-colour.pdf')
load("wine.Rdata")
attach(wine)
hist(Alcohol, col='lightgreen')
rug(Alcohol)
dev.off()

http://rattle.togaware.com/code/rplot-hist-colour.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