September 2014
Intermediate to advanced
512 pages
12h 39m
English
The mpld3 library automatically converts matplotlib figures to interactive D3.js visualizations. In this recipe, we will see how to use this library in the notebook.
To install the mpld3 library, you can just type pip install mpld3 in a terminal. See also the main website at http://mpld3.github.io.
In [1]: import numpy as np
import matplotlib.pyplot as plt
%matplotlib inlineIn [2]: from mpld3 import enable_notebook
enable_notebook()In [3]: X = np.random.normal(0, 1, (100, 3)) color = np.random.random(100) ...
Read now
Unlock full access