Other Visualization Packages in Python¶
There are a number of packages which interact with matplotlib, or work on their own, to extend python’s plotting abilities.
We’ll use the Roessler chaos model to generate data for plotting in this notebook:
%pylab inline import pysd model = pysd.read_vensim('../../models/Roessler_Chaos/roessler_chaos.mdl') res = model.run()
Seaborn is a
package which aims to make plots more stylish. To use it, we simply have
to import it into the python environment and continue plotting as with
Seaborn provides a host of new functions and
customizations that are illustrated
import seaborn plt.plot(res['x'], res['y']);
Note that in the figure below, zoom and pan tools allow you to interact with the image.
Syntax here is very similar to before, with the addition of a call to
display function. For further examples see the mpld3
import mpld3 plt.plot(res['x'], res['y']); mpld3.display()