diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 47ac49334d6..b5b61442591 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -235,7 +235,7 @@ It is important to note that Dash does not use the renderers framework discussed 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. - +``` import dash_core_components as dcc import plotly.graph_objs as go @@ -245,7 +245,7 @@ dcc.Graph( id='example-graph-2', figure=fig ) - +``` ## Displaying Figures Using `ipywidgets` 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.