pyplot

In Matplotlib, the pyplot module provides the interface for creating figures for plotting data points on the screen.

Syntax

import matplotlib.pyplot as plt

The pyplot module is made available in an import statement and usually under an alias like plt.

pyplot

.legend()
Places a legend on the axes, allowing access to manipulate parameters of the legend.

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn Python:Matplotlib on Codecademy