Block 32: Common Plot Types
Create bar, scatter, and histogram charts.
Concepts
- ax.bar() and ax.barh() for bar charts
- ax.scatter() for relationships
- ax.hist() with bins parameter
- Color, alpha, and edge color options
Code Examples
See exercise below.
Exercise
Bar chart of average tip by day (from tips dataset). Histogram of sepal_length with 20 bins.
Homework
When would you choose a histogram over a scatter plot? Give a real scenario. Tuesday