We will discuss and demonstrate some of the exciting features that have been added to version 3 of the plotly Python visualization library. These include ipywidgets integration for building ad-hoc dashboards in the Jupyter Notebook, support for exporting publication quality static images, Latex integration, and more. We will conclude with glimpse into the future direction of the project.
- What is plotly.py? plotly.py is the Python library for creating visualizations using Plotly.js and displaying them in various contexts, like the Jupyter Notebook.
- How did plotly.py interact with Plotly.js before version 3? Prior to version 3, plotly.py could only create Plotly.js visualizations. It was unable to update existing visualizations, and it was unable to receive user interaction events like click, hover, and selection.
- What are the benefits of the ipywidgets integration in version 3? By integrating with the ipywidgets framework, plotly.py is now able to interactively update existing figures, and Python callback functions can now be registered for execution in response to user interaction events like click, hover, and selection.
Live Jupyter Notebook Dashboard Demo:
Static Image Export:
- How does static image exort work in plotly.py? Static image export in plotly.py is accomplished through tight integration with the plotly orca project. Orca is a stand-alone electron application that inputs figure specifications and then uses Plotly.js to generate corresponding static images.
- Live demo of exporting high quality raster and vector static images
- How does it work in plotly.py? Plotly.js uses MathJax to render Latex equations into SVG image fragments, which are directly incorporated into the SVG representation of the Plotly.js figure. This approach makes it possible to export figures containing Latex equations as publication quality vector images.
- Live demo of Latex support in the Jupyter Notebook and in static image export.
And finally, we will conclude with a glimpse into the future direction of plotly.py