Introduction to ggplot2

library(ggplot2)

The first function you might start with is qplot, short for quick plot. It behaves similarly to the base plot function, but it provides many more options.

qplot(displ, cyl, data = mpg)

plot of chunk unnamed-chunk-2

qplot(displ, data = mpg, binwidth = 1)

plot of chunk unnamed-chunk-2