You can draw an interactive plot in Jupyter Notebook (with matplotlib) if you run this code before drawing the plot:

%matplotlib notebook

The interactive plot looks like this and supports zooming:

An interactive plot with zooming support
An interactive plot with zooming support

Note that you must run this line before every interactive plot you want to create. Also, the plot remains interactive until you call “%matplotlib notebook” again, change the mode to inline (“%matplotlib inline”) or quit the interactive mode by clicking the button in the top right corner of the plot.

If you draw a second plot while one of you plots is interactive the command will add another dataset to the existing plot instead of creating a new one:

A second interactive plot
A second interactive plot
Subscribe to the newsletter
Older post

[book review] James Whittaker's Little Book of the Future

Read this book if you believe we can use A.I. and IoT to build a bright future.

Newer post

How to split a list inside a Dataframe cell into rows in Pandas

Step by step instructions to "explode" a list into DataFrame rows.