0
10
20
30
40
50
2seater
compact
midsize
minivan
pickup
subcompact
suv
Class
Count
Drive
4
f
r
Segmented bar plot of the number of cars in each class by drive type
Bar Plot
Source: mpg dataset from ggplot2 package