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 import HoverTool county_coordinate_xs=[ us_counties.data[code]['lons'] for code in us_counties.data if us_counties.data[code]['state'] == 'ca' ] county_coordinate_ys=[ us_counties.data[code]['lats'] for code in us_counties.data if us_counties...