Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Plotly interaction

  • Here we show some basic ways of bringing Plotly graphs to life.

Animation

  • Many plot types can easily be animated.

  • Parameters animation_frame and animation_group control what is animated

Loading...
Loading...
Loading...
Loading...

Plotly templates

  • Themes can easily be changed to one in the default set or be tuned specifically.

Templates configuration ----------------------- Default template: 'plotly' Available templates: ['ggplot2', 'seaborn', 'simple_white', 'plotly', 'plotly_white', 'plotly_dark', 'presentation', 'xgridoff', 'ygridoff', 'gridon', 'none']
Loading...

Plotly callbacks

  • The following code generates a random scatter.

  • The callback update_point changes markers based on clicking and selection.

Loading...

Selection behaviour

  • The selection in one graph affects a second graph.

Loading...

Adding widgets to a Plotly graph

  • As with the above interactivity, accessing the object to minpulate is important.

  • Using the interactive function from ipywidgets in combination with a function that sets the properties is convenient.

Loading...
Loading...