Widgets in IPython notebook and Plotly

What’s a widget?

3d-widget-gif

Widgets in IPython notebooks are controls that let you interactively explore a graph or dataset. As of versions >1.5.0, the Plotly Python package fully supports IPython widgets and exposes additional functionality for interactive exploration of Plotly graphs, like handlers for clicking and hovering on graph data points. To get the latest Plotly version, enter

in your terminal.

Below are example IPython notebooks organized by widget type. If you’re looking for a particular example, write us at feedback@plot.ly or @plotlygraphs on Twitter. For the basics, see this overview of IPython widgets with Plotly.

Unfortunately, IPython notebooks shared on nbviewer.ipython.org can’t display widgets, so in the examples below, you’ll have to download the notebooks from the link in the upper-right corner and run them locally. There are also short video samples to give a quick idea of what each notebook does.

Example 1: Overview

A basic example of a FigureWidgets in Plotly 3.

EXAMPLE 2: data shader 

How to use DataShader to display large datasets inside a plotly FigureWidget.

EXAMPLE 3: interact

A simple example of using the interact decorator from ipywidgets to create a simple set of widgets to control the parameters of a plot.

EXAMPLE 4: cars exploration

2D Density Chart visualization of cars dataset.

EXAMPLE 5: iris dashboard

1X1 Facet Grid with Plotly FigureWidget.

EXAMPLE 6: nyc taxi selection

An example of the distribution of trip distances for a potion of the NYC taxi data set for January 2015.