Skip to contents

Example on a ggplot2 image

library(ggplot2)

# counts (or sums of weights)
g <- ggplot(mpg, aes(class))
# Number of cars in each class:
g + geom_bar()
A ggplot2 image

A ggplot2 image