23 February 2016

info

  1. bringing together

    1. matplotlib popular python-based graphing library

    2. d3.js popular js library

  2. simple api for explorting matplotlib to html code

examples

  1. example gallery

    1. defining a custom plugin

    2. draggable points example

    3. html tooltip plugin

    4. image with mouse position

    5. linked brushing example

    6. mpld3 logo idea

    7. patches and paths

    8. scatter plot with tooltips

    9. visualizing random walks

  2. notebook example

    1. plugins in mpld3

    2. demo of mpld3

stackoverflow

  1. 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) 
    


blog comments powered by Disqus