Creating animated and interactive plots

There are a few tools for interactive plots that one may choose from, such as Bokeh, Plotly, and VisPy.

Bokeh allows you to plot matplotlib objects via JavaScript, which enables the interactive part easily. For instance, if one needs a map plot that is interactive, Bokeh can be used. Bokeh uses JavaScript and enables D3.js style plots and targets the visualization via modern web browsers. Bokeh delivers good performance over a large dataset. You can easily install bokeh either via conda or pip, as shown in the following code:

conda install bokeh
   OR
pip install bokeh
import collections from bokeh.sampledata import us_counties, unemployment from bokeh.plotting import figure, show, output_file from bokeh.models ...

Get Python: Data Analytics and Visualization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.