Activity: Using Density Plots to Compare Distributions

Steps for Completion:

  1. Use the RestaurantTips dataset in Lock5data.
  2. Compare the TIP amount for various days. Use aes=color for geom_density command.
  3. Superimpose all of the plots.
  4. Use the scale_x_continuous command for the x-axis tick marks.

Get Applied Data Visualization with R and ggplot2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.