Loading...

%matplotlib inline

A Jupyter magic that renders matplotlib plots as static PNG images inline below the cell.

When to use: Whenever you want plots rendered in the notebook (vs. opening separate windows).

Example: %matplotlib inline; import matplotlib.pyplot as plt; plt.plot([1,2,3]) → inline static plot.

More Jupyter & Colab Glossary terms