Skip to content

Commit a61fad5

Browse files
Merge pull request #2381 from plotly/nicolaskruchten-patch-9
Update renderers.md
2 parents 0c33f20 + 6efc3d4 commit a61fad5

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

Diff for: doc/python/renderers.md

-20
Original file line numberDiff line numberDiff line change
@@ -227,26 +227,6 @@ fig = go.Figure(
227227
fig.show(renderer="png", width=800, height=300)
228228
```
229229

230-
### Displaying Figures Using Dash
231-
232-
[Dash](https://dash.plot.ly) is a Python framework for building web applications, and it provides built-in support for displaying figures created with Plotly's graphing libraries. See the [Dash User Guide](https://dash.plot.ly/) for more information.
233-
234-
It is important to note that Dash does not use the renderers framework discussed above, so you should not try to use the `.show()` figure method or the `plotly.io.show` function to render figures inside Dash applications.
235-
236-
Instead, pass your figure as the `figure` parameter to the [`dcc.Graph`](https://dash.plot.ly/dash-core-components/graph) component, which is part of the [Dash Core Components](https://dash.plot.ly/dash-core-components) library. The code below demonstrates how to do this.
237-
238-
```
239-
import dash_core_components as dcc
240-
import plotly.graph_objs as go
241-
242-
fig = go.Figure(data=[go.Scatter(x=[1, 2, 3], y=[4, 1, 2])])
243-
244-
dcc.Graph(
245-
id='example-graph-2',
246-
figure=fig
247-
)
248-
```
249-
250230
## Displaying Figures Using `ipywidgets`
251231
Plotly figures can be displayed in [ipywidgets](https://ipywidgets.readthedocs.io/en/stable/) contexts using `plotly.graph_objects.FigureWidget` objects. `FigureWidget` is a figure graph object (just like `plotly.graph_objects.Figure`), so you can add traces to it and update it just like a regular `Figure`. But `FigureWidget` is also an `ipywidgets` object, which means that you can display it alongside other `ipywidgets` to build user interfaces right in the notebook.
252232

0 commit comments

Comments
 (0)