- Using the
mpg
data, calculate the mean highway fuel efficiency for each number of cylinders and plot a line graph of fuel efficiency by cylinder number.
- Repeat the previous plot but also group by class and plot separately colored lines for different classes.
- Create a new column called
low_high
that codes high fuel efficiency greater than or equal to 25 as 1 and less than 25 as 0. Plot low_high
as a function of displacement with a bubble chart (no legend) and include a logistic regression curve and band.
- Plot highway fuel efficiency for each class as points first, then add jitter, finding an appropriate amount of jitter to add.
- Repeat plot #4 with a beeswarm plot.