Graphics Reference
In-Depth Information
hist(mtcars$mpg)
# Specify approximate number of bins with breaks
hist(mtcars$mpg, breaks
=
10
)
Figure 2-8. Left: histogram with base graphics; right: with more bins. Notice that because the bins
are narrower, there are fewer items in each bin.
qplot(mtcars$mpg)