course content

Course Content

Visualization in Python with matplotlib

Plot Labels and TitlePlot Labels and Title

Great! Let's continue improving our plot with some customizing stuff.

Couple more things we can add to our charts are custom labels on the axis and title for the entire plot. To add labels, use .set_xlabel('text') and .set_ylabel('text') functions applied to Axes object to set custom ('text') labels on the x-axes or y-axes, respectively.

To set the plot title use the .title('text') method applied to matplotlib.pyplot (usually imported as plt). For example, let's add axes labels and title to the example plot we've built.

Section 1.

Chapter 8