plotly v1.9.5 Release Notes

Release Date: 2016-01-17 // over 8 years ago
  • ➕ Added

    • Offline matplotlib to Plotly figure conversion. Use offline.plot_mpl to convert and plot a matplotlib figure as a Plotly figure independently of IPython/Jupyter notebooks or use offline.iplot_mpl to convert and plot inside of IPython/Jupyter notebooks. Additionally, use offline.enable_mpl_offline to convert and plot all matplotlib figures as plotly figures inside an IPython/Jupyter notebook. See examples below:

    An example independent of IPython/Jupyter notebooks:

    from plotly.offline import init_notebook_mode, plot_mpl
    import matplotlib.pyplot as plt
    
    init_notebook_mode()
    
    fig = plt.figure()
    x = [10, 15, 20]
    y = [100, 150, 200]
    plt.plot(x, y, "o")
    
    plot_mpl(fig)
    

    An example inside of an IPython/Jupyter notebook:

    from plotly.offline import init_notebook_mode, iplot_mpl
    import matplotlib.pyplot as plt
    
    init_notebook_mode()
    
    fig = plt.figure()
    x = [10, 15, 20]
    y = [100, 150, 200]
    plt.plot(x, y, "o")
    
    iplot_mpl(fig)
    

    An example of enabling all matplotlib figures to be converted to Plotly figures inside of an IPython/Jupyter notebook:

    from plotly.offline import init_notebook_mode, enable_mpl_offline
    import matplotlib.pyplot as plt
    
    init_notebook_mode()
    enable_mpl_offline()
    
    fig = plt.figure()
    x = [10, 15, 20, 25, 30]
    y = [100, 250, 200, 150, 300]
    plt.plot(x, y, "o")
    fig