Grammar of graphics II

Author

Jeffrey R. Stevens

Published

April 3, 2023

  1. Using the mtcars data, create a scatterplot of the fuel efficiency as a function of weight.
# >
  1. Repeat the scatterplot, but make the points violet open squares of size 5.
# >
  1. Repeat the scatterplot but with separate colors for cylinder levels.
# >
  1. Why does the legend look like that? Fix it so there are separate colors for cylinder levels.
# >
  1. Overlay separate regression lines for each cylinder level.
# >
  1. Overlay a single firebrick regression line over the points with a firebrick1-colored confidence band.
# >
  1. Plot the mean and standard error of the mean of fuel efficiency for each level of cylinder and color them sienna.
# >