Static Matplotlib Figures

Static Matplotlib Figures#

Specify the static Jupyter matplotlib integration. This must be run first, before any figures are created.

This disables any interactivity, displaying only a PNG image of the figure in the Jupyter Lab view.

%matplotlib inline
import matplotlib.pyplot as plt

plt.plot([1,2,3,4])
[<matplotlib.lines.Line2D at 0x7fe46cc5d160>]
../../_images/4c4cbe97c310a0e91940407eac949d78ed2d251beb48caac7a1fb40c992c797a.png
import matplotlib.pyplot as plt

plt.plot([1,4,9,16])
[<matplotlib.lines.Line2D at 0x7fe46cc8ef60>]
../../_images/e1b6113bc91cfe8c87d8ffb908db4affc4658a6adf962d6fb231e847e7090720.png