Locked lesson.
About this lesson
We discuss how to create another type of data visualization: area plots.
Exercise files
Download this lesson’s related exercise files.
Plotting Area Plots.docx58.6 KB Plotting Area Plots - Solution.docx
55.4 KB
Quick reference
Plotting Area Plots
Area plots allow us to graph the area below our data.
When to use
Use this technique whenever your data calls for an area plot.
Instructions
To create an area plot on a dataframe:
my_df.plot(kind='area')
To add transparency to the plot:
my_df.plot(kind='area', alpha=0.4)
Hints & tips
- The data for an area plot needs to be all negative, or all positive, it can't be both.
- Area Plots: my_df.plot(kind='area')
- Add Transparency: my_df.plot(kind='area', alpha=0.4)
Lesson notes are only available for subscribers.