Code
ggplot(airquality, aes(Temp, Ozone)) +
geom_point() +
geom_smooth(method = "loess")
We’re getting married! https://torlakova-molino.com
Figure 1 further explores the impact of temperature on ozone level.
This dataset contains a subset of the fuel economy data from the EPA. Specifically, we use the mpg dataset from the ggplot2 package.
Figure 2 shows a positive, strong, and linear relationship between the city and highway mileage of these cars. Additionally, mileage is higher for cars with fewer cylinders.
The plots in Figure 3 show the relationship between city and highway mileage for 38 popular models of cars. In Figure 3 (a) the points are colored by the number of cylinders while in Figure 3 (b) the points are colored by engine displacement.