info
-
bringing together
-
matplotlib popular python-based graphing library
-
d3.js popular js library
-
-
simple api for explorting matplotlib to html code
examples
stackoverflow
-
python how to add tooltips to pandas plots
import mpld3, pandas as pd mpld3.enable_notebook() df = pd.DataFrame(np.cumsum(np.random.normal(0,1,(5,1000)),axis=1).T) axes = df.plot(figsize=(14,4), colormap='spectral'); labels = list(df.columns.values) for i in range(len(labels)): tooltip = mpld3.plugins.LineLabelTooltip(axes.get_lines()[i], labels[i]) mpld3.plugins.connect(plt.gcf(), tooltip)