Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Plot Labels and Title | Basics: Line Charts
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.

Everything was clear?

Section 1. Chapter 8
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.

Everything was clear?

Section 1. Chapter 8
some-alt