Render a chart interactively
Notebook or interactive Python session
Plotly · Function
Displays a Plotly figure using the renderer framework. You can use the configured default renderer or select an available renderer for a particular display call.
pio.show accepts a Plotly figure or figure-like dictionary and renders it through Plotly's renderer framework. The optional renderer argument can select a specific renderer for that display call; otherwise the configured default renderer is used.
plotly.io.show(fig, *args, **kwargs)| Name | Type | Description |
|---|---|---|
fig | object | Figure or figure-like dictionary to display. |
renderer | str or None | Optional name of an available renderer to use for this display. |
Displays the figure; no documented return value was provided in the available official documentation.
import plotly.express as px
import plotly.io as pio
fig = px.bar(x=["A", "B", "C"], y=[2, 5, 3])
pio.show(fig, renderer="browser")Creates a bar figure and displays it with Plotly's browser renderer.
Notebook or interactive Python session
Browser-based viewing
Custom output environments
It displays a Plotly figure or figure-like object using the renderer framework. The renderer determines how and where the chart is presented.
Follow-up: How would you change rendering for one call without changing configuration? Pass an available renderer name through the renderer keyword argument.
Pass the figure as the first argument and optionally provide renderer to choose an available renderer. Without renderer, Plotly uses its configured default renderer or renderers.
Follow-up: How can the default be changed for later displays? Assign an available renderer name to pio.renderers.default.
A graph-object figure can be displayed with either fig.show() or plotly.io.show(fig). Both use the current default renderer configuration.
Follow-up: When is pio.show useful with low-level data? It can display figures represented as dictionaries, including figure-like dictionaries.
plotly.io.renderersplotly.graph_objects.Figure.showplotly.io.write_htmlplotly.io.to_html