From 84cf0114b729a8bd6bc8d995dfa103ca4f606d24 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Tue, 7 Oct 2025 13:25:46 -0400 Subject: [PATCH 01/15] add references to cloud --- doc/python/3d-mesh.md | 2 +- doc/python/3d-scatter-plots.md | 2 +- doc/python/animations.md | 2 +- doc/python/axes.md | 2 +- doc/python/bar-charts.md | 24 ++++++++--------- doc/python/bio-volcano-plot.md | 4 +-- doc/python/box-plots.md | 2 +- doc/python/builtin-colorscales.md | 2 +- doc/python/candlestick-charts.md | 2 +- doc/python/choropleth-maps.md | 2 +- doc/python/colorscales.md | 2 +- doc/python/creating-and-updating-figures.md | 2 +- doc/python/discrete-color.md | 2 +- doc/python/distplot.md | 2 +- doc/python/figure-labels.md | 2 +- doc/python/figure-structure.md | 2 +- doc/python/filled-area-plots.md | 6 ++--- doc/python/getting-started.md | 2 +- doc/python/heatmaps.md | 2 +- doc/python/histograms.md | 2 +- doc/python/horizontal-vertical-shapes.md | 16 +++++------ doc/python/hover-text-and-formatting.md | 2 +- doc/python/interactive-html-export.md | 2 +- doc/python/legend.md | 2 +- doc/python/line-and-scatter.md | 30 ++++++++++----------- doc/python/line-charts.md | 2 +- doc/python/marker-style.md | 2 +- doc/python/ml-knn.md | 2 +- doc/python/ml-regression.md | 2 +- doc/python/ml-roc-pr.md | 2 +- doc/python/multiple-axes.md | 2 +- doc/python/network-graphs.md | 2 +- doc/python/pie-charts.md | 2 +- doc/python/plot-data-from-csv.md | 2 +- doc/python/plotly-express.md | 2 +- doc/python/renderers.md | 2 +- doc/python/sankey-diagram.md | 2 +- doc/python/setting-graph-size.md | 2 +- doc/python/shapes.md | 2 +- doc/python/subplots.md | 2 +- doc/python/table.md | 2 +- doc/python/text-and-annotations.md | 18 ++++++------- doc/python/tick-formatting.md | 2 +- doc/python/tile-county-choropleth.md | 2 +- doc/python/time-series.md | 16 +++++------ 45 files changed, 95 insertions(+), 95 deletions(-) diff --git a/doc/python/3d-mesh.md b/doc/python/3d-mesh.md index edec74b624..f444affa15 100644 --- a/doc/python/3d-mesh.md +++ b/doc/python/3d-mesh.md @@ -72,7 +72,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/3d-scatter-plots.md b/doc/python/3d-scatter-plots.md index 46e389b565..b913bc8f56 100644 --- a/doc/python/3d-scatter-plots.md +++ b/doc/python/3d-scatter-plots.md @@ -77,7 +77,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/animations.md b/doc/python/animations.md index c61162693e..763ec72842 100644 --- a/doc/python/animations.md +++ b/doc/python/animations.md @@ -52,7 +52,7 @@ px.scatter(df, x="gdpPercap", y="lifeExp", animation_frame="year", animation_gro [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/axes.md b/doc/python/axes.md index 98271570a8..e058fbfe7b 100644 --- a/doc/python/axes.md +++ b/doc/python/axes.md @@ -128,7 +128,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/bar-charts.md b/doc/python/bar-charts.md index 3e28be0dfe..3b2377912d 100644 --- a/doc/python/bar-charts.md +++ b/doc/python/bar-charts.md @@ -6,7 +6,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.3' - jupytext_version: 1.16.4 + jupytext_version: 1.17.3 kernelspec: display_name: Python 3 (ipykernel) language: python @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.11.10 + version: 3.9.0 plotly: description: How to make Bar Charts in Python with Plotly. display_as: basic @@ -91,7 +91,7 @@ wide_df [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true @@ -589,7 +589,7 @@ fig.update_layout( ) ``` -### Using a scatterplot to wrap long bars into multiple columns +### Using a scatterplot to wrap long bars into multiple columns This bar-style pictogram allows readers to focus on the relative sizes of smaller entities by wrapping the bar for largest entries into multiple columns. You could make it even more of a pictogram by using fontawesome to replace the square markers we use below with icons like mortar boards for students. @@ -597,25 +597,25 @@ This bar-style pictogram allows readers to focus on the relative sizes of smalle import plotly.graph_objects as go import pandas as pd def pictogram_bar(data, title, icon_size, max_icons_per_column=10, units_per_icon=1, unit_description="", inter_group_spacing=.8,icon_vertical_spacing=0.005): - + fig = go.Figure() x_start = 1 tick_locations = [] - #loop through each group and create a trace with its icons + #loop through each group and create a trace with its icons for i, (category, value) in enumerate(data.items()): # compute the number of icons to use to represent this category. Depending on your use case, you might replace round with floor or ceiling. icon_count = round(value / units_per_icon) # compute the number of columns in which to arrange the icons for this category # using a double negative sign to convert a floor(division) operation into a ceiling(division) operation num_columns = -(-icon_count // max_icons_per_column) - + #create and populate lists of icon coordinates x_coordinates, y_coordinates = [], [] for col in range(num_columns): # the number of icons in this column is the lesser of the column height or # the number of icons remaining to place column_icons = min(max_icons_per_column, icon_count - col * max_icons_per_column) - + # Create a one item list containing the x-coordinate of this column. # Then add column_icons copies of that coordinate to the list of icon x coordinates using list multiplication. # Normalizing the width of each within-category column to 1 simplifies the code. @@ -634,7 +634,7 @@ def pictogram_bar(data, title, icon_size, max_icons_per_column=10, units_per_ico hoverinfo="text", text=[f"{category}: {value}" for _ in range(len(x_coordinates))] )) - + # Add an annotation above the center of each category showing its value fig.add_trace(go.Scatter( x=[x_start + (num_columns - 1) / 2], # Compute the location of the center @@ -661,7 +661,7 @@ def pictogram_bar(data, title, icon_size, max_icons_per_column=10, units_per_ico ), yaxis=dict( title=f"Each icon represents {units_per_icon:,g} {unit_description}", - # The y-axis goes above the top icon to make room for the annotations. + # The y-axis goes above the top icon to make room for the annotations. # We set tick values so the axis labeling does not go above the top icon. # If you choose a value of max_icons_per_column that is not a multiple of 5, consider changing this. tickvals=list(range(0,max_icons_per_column+1,5)), @@ -669,10 +669,10 @@ def pictogram_bar(data, title, icon_size, max_icons_per_column=10, units_per_ico zeroline=False, ), # We have already got all the labeling we need so we suppress the legend. - showlegend=False, + showlegend=False, height=700, # The x-coordinates scale to fill available space, so adjusting the width of the image is a good way to adjust spacing between columns. - width=(len(data) * 150 + 50) + width=(len(data) * 150 + 50) ) fig.show() diff --git a/doc/python/bio-volcano-plot.md b/doc/python/bio-volcano-plot.md index 0b3ea56f0b..d28d184568 100644 --- a/doc/python/bio-volcano-plot.md +++ b/doc/python/bio-volcano-plot.md @@ -7,7 +7,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.3' - jupytext_version: 1.13.0 + jupytext_version: 1.17.3 kernelspec: display_name: Python 3 (ipykernel) language: python @@ -21,7 +21,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.9.7 + version: 3.9.0 plotly: display_as: bio language: python diff --git a/doc/python/box-plots.md b/doc/python/box-plots.md index 1eaec475db..0dff5c64ed 100644 --- a/doc/python/box-plots.md +++ b/doc/python/box-plots.md @@ -69,7 +69,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true from IPython.display import IFrame diff --git a/doc/python/builtin-colorscales.md b/doc/python/builtin-colorscales.md index a9eb672c3f..280671f3fe 100644 --- a/doc/python/builtin-colorscales.md +++ b/doc/python/builtin-colorscales.md @@ -78,7 +78,7 @@ print(px.colors.sequential.Plasma) [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/candlestick-charts.md b/doc/python/candlestick-charts.md index 06273b4ad4..36712d47d3 100644 --- a/doc/python/candlestick-charts.md +++ b/doc/python/candlestick-charts.md @@ -78,7 +78,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/choropleth-maps.md b/doc/python/choropleth-maps.md index 7f9984478f..78573bcf31 100644 --- a/doc/python/choropleth-maps.md +++ b/doc/python/choropleth-maps.md @@ -147,7 +147,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true from IPython.display import IFrame diff --git a/doc/python/colorscales.md b/doc/python/colorscales.md index 61e84314d4..3ff95da099 100644 --- a/doc/python/colorscales.md +++ b/doc/python/colorscales.md @@ -94,7 +94,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/creating-and-updating-figures.md b/doc/python/creating-and-updating-figures.md index b23d69e41b..f5d40ba03e 100644 --- a/doc/python/creating-and-updating-figures.md +++ b/doc/python/creating-and-updating-figures.md @@ -131,7 +131,7 @@ print("\n\n") [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/discrete-color.md b/doc/python/discrete-color.md index 39d676bff3..ed571cd11a 100644 --- a/doc/python/discrete-color.md +++ b/doc/python/discrete-color.md @@ -103,7 +103,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true from IPython.display import IFrame diff --git a/doc/python/distplot.md b/doc/python/distplot.md index 2d322e939d..07480a3925 100644 --- a/doc/python/distplot.md +++ b/doc/python/distplot.md @@ -60,7 +60,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/figure-labels.md b/doc/python/figure-labels.md index ffd652c3cb..5cd49cb91d 100644 --- a/doc/python/figure-labels.md +++ b/doc/python/figure-labels.md @@ -110,7 +110,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash dash-daq`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true from IPython.display import IFrame diff --git a/doc/python/figure-structure.md b/doc/python/figure-structure.md index f55abad91b..495f1a4497 100644 --- a/doc/python/figure-structure.md +++ b/doc/python/figure-structure.md @@ -53,7 +53,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/filled-area-plots.md b/doc/python/filled-area-plots.md index 33446f0293..d475049204 100644 --- a/doc/python/filled-area-plots.md +++ b/doc/python/filled-area-plots.md @@ -52,7 +52,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true @@ -133,9 +133,9 @@ fig.show() *New in 5.20* -Scatter traces with a fill support a `fillgradient`, which is a `dict` of options that defines the gradient. Use `fillgradient.colorscale` to define the [colorscale](https://plotly.com/python/colorscales) for the gradient and choose a `type` to define the orientation of the gradient (`'horizontal'`, `'vertical'` or `'radial'`). +Scatter traces with a fill support a `fillgradient`, which is a `dict` of options that defines the gradient. Use `fillgradient.colorscale` to define the [colorscale](https://plotly.com/python/colorscales) for the gradient and choose a `type` to define the orientation of the gradient (`'horizontal'`, `'vertical'` or `'radial'`). -In the following example, we've defined a `horizontal` `fillgradient` with a colorscale of three colors. +In the following example, we've defined a `horizontal` `fillgradient` with a colorscale of three colors. ```python import plotly.graph_objects as go diff --git a/doc/python/getting-started.md b/doc/python/getting-started.md index 6b4b1686e0..c50cceff19 100644 --- a/doc/python/getting-started.md +++ b/doc/python/getting-started.md @@ -79,7 +79,7 @@ You'll also need to install a [supported dataframe library](/python/px-arguments [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/heatmaps.md b/doc/python/heatmaps.md index c4d74f4e3a..cbbc73fa81 100644 --- a/doc/python/heatmaps.md +++ b/doc/python/heatmaps.md @@ -97,7 +97,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/histograms.md b/doc/python/histograms.md index aca2c25b3d..004dff0aee 100644 --- a/doc/python/histograms.md +++ b/doc/python/histograms.md @@ -104,7 +104,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/horizontal-vertical-shapes.md b/doc/python/horizontal-vertical-shapes.md index 02ec841723..67417f2e46 100644 --- a/doc/python/horizontal-vertical-shapes.md +++ b/doc/python/horizontal-vertical-shapes.md @@ -71,7 +71,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true @@ -95,9 +95,9 @@ import plotly.express as px df = px.data.stocks(indexed=True) fig = px.line(df) fig.add_hline(y=1, line_dash="dot", - annotation_text="Jan 1, 2018 baseline", + annotation_text="Jan 1, 2018 baseline", annotation_position="bottom right") -fig.add_vrect(x0="2018-09-24", x1="2018-12-18", +fig.add_vrect(x0="2018-09-24", x1="2018-12-18", annotation_text="decline", annotation_position="top left", fillcolor="green", opacity=0.25, line_width=0) fig.show() @@ -111,12 +111,12 @@ import plotly.express as px df = px.data.stocks(indexed=True) fig = px.line(df) fig.add_hline(y=1, line_dash="dot", - annotation_text="Jan 1, 2018 baseline", + annotation_text="Jan 1, 2018 baseline", annotation_position="bottom right", annotation_font_size=20, annotation_font_color="blue" ) -fig.add_vrect(x0="2018-09-24", x1="2018-12-18", +fig.add_vrect(x0="2018-09-24", x1="2018-12-18", annotation_text="decline", annotation_position="top left", annotation=dict(font_size=20, font_family="Times New Roman"), fillcolor="green", opacity=0.25, line_width=0) @@ -132,7 +132,7 @@ import plotly.express as px df = px.data.stocks(indexed=True) fig = px.line(df, facet_col="company", facet_col_wrap=2) fig.add_hline(y=1, line_dash="dot", row=3, col="all", - annotation_text="Jan 1, 2018 baseline", + annotation_text="Jan 1, 2018 baseline", annotation_position="bottom right") fig.add_vrect(x0="2018-09-24", x1="2018-12-18", row="all", col=1, annotation_text="decline", annotation_position="top left", @@ -176,11 +176,11 @@ fig.show() ``` -With [text labels on shapes](/python/shapes/#adding-text-labels-to-shapes), you can also add text labels to shapes other than lines and rectangles, and the labels can be added automatically to shapes drawn by the user. +With [text labels on shapes](/python/shapes/#adding-text-labels-to-shapes), you can also add text labels to shapes other than lines and rectangles, and the labels can be added automatically to shapes drawn by the user. ### Reference -More details are available about [layout shapes](/python/shapes/) and [annotations](/python/text-and-annotations). +More details are available about [layout shapes](/python/shapes/) and [annotations](/python/text-and-annotations). Reference documentation is also available for [`add_hline`](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html?highlight=add_hline#plotly.graph_objects.Figure.add_hline), [`add_vline`](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html?highlight=add_vline#plotly.graph_objects.Figure.add_vline), [`add_hrect`](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html?highlight=add_hrect#plotly.graph_objects.Figure.add_hrect), [`add_vrect`](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html?highlight=add_vrect#plotly.graph_objects.Figure.add_vrect). diff --git a/doc/python/hover-text-and-formatting.md b/doc/python/hover-text-and-formatting.md index cdbc4058da..b110c8720d 100644 --- a/doc/python/hover-text-and-formatting.md +++ b/doc/python/hover-text-and-formatting.md @@ -138,7 +138,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** Change the hovermode below and try hovering over the points: diff --git a/doc/python/interactive-html-export.md b/doc/python/interactive-html-export.md index 461afe7f54..dc33813570 100644 --- a/doc/python/interactive-html-export.md +++ b/doc/python/interactive-html-export.md @@ -104,7 +104,7 @@ with open(output_html_path, "w", encoding="utf-8") as output_file: [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/legend.md b/doc/python/legend.md index 6fc879fbc9..20021699be 100644 --- a/doc/python/legend.md +++ b/doc/python/legend.md @@ -194,7 +194,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/line-and-scatter.md b/doc/python/line-and-scatter.md index 51291cfaa5..b82312afcc 100644 --- a/doc/python/line-and-scatter.md +++ b/doc/python/line-and-scatter.md @@ -89,7 +89,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true @@ -284,7 +284,7 @@ fig.update_traces(textposition="bottom right") fig.show() ``` -### Swarm (or Beeswarm) Plots +### Swarm (or Beeswarm) Plots Swarm plots show the distribution of values in a column by giving each entry one dot and adjusting the y-value so that dots do not overlap and appear symmetrically around the y=0 line. They complement [histograms](https://plotly.com/python/histograms/), [box plots](https://plotly.com/python/box-plots/), and [violin plots](https://plotly.com/python/violin/). This example could be generalized to implement a swarm plot for multiple categories by adjusting the y-coordinate for each category. @@ -296,7 +296,7 @@ import collections def negative_1_if_count_is_odd(count): # if this is an odd numbered entry in its bin, make its y coordinate negative - # the y coordinate of the first entry is 0, so entries 3, 5, and 7 get + # the y coordinate of the first entry is 0, so entries 3, 5, and 7 get # negative y coordinates if count % 2 == 1: return -1 @@ -312,9 +312,9 @@ def swarm( gap_multiplier=1.2, bin_fraction=0.95, # slightly undersizes the bins to avoid collisions ): - # sorting will align columns in attractive c-shaped arcs rather than having + # sorting will align columns in attractive c-shaped arcs rather than having # columns that vary unpredictably in the x-dimension. - # We also exploit the fact that sorting means we see bins sequentially when + # We also exploit the fact that sorting means we see bins sequentially when # we add collision prevention offsets. X_series = X_series.copy().sort_values() @@ -341,9 +341,9 @@ def swarm( list_of_rows.append( {"x": x_val, "y_slot": bin_counter[bin], "bin": bin}) - # iterate through the points and "offset" any that are colliding with a + # iterate through the points and "offset" any that are colliding with a # point to their left apply the offsets to all subsequent points in the same bin. - # this arranges points in an attractive swarm c-curve where the points + # this arranges points in an attractive swarm c-curve where the points # toward the edges are (weakly) further right. bin = 0 offset = 0 @@ -360,21 +360,21 @@ def swarm( and (((fig_width*(row["x"]-other_row["x"]))/(max_x-min_x) // point_size) < 1)): offset += 1 - # update the bin count so we know whether the number of + # update the bin count so we know whether the number of # *used* slots is even or odd bin_counter.update([bin]) row["y_slot"] += offset # The collision free y coordinate gives the items in a vertical bin - # y-coordinates to evenly spread their locations above and below the - # y-axis (we'll make a correction below to deal with even numbers of + # y-coordinates to evenly spread their locations above and below the + # y-axis (we'll make a correction below to deal with even numbers of # entries). For now, we'll assign 0, 1, -1, 2, -2, 3, -3 ... and so on. - # We scale this by the point_size*gap_multiplier to get a y coordinate + # We scale this by the point_size*gap_multiplier to get a y coordinate # in px. row["y"] = (row["y_slot"]//2) * \ negative_1_if_count_is_odd(row["y_slot"])*point_size*gap_multiplier - # if the number of points is even, move y-coordinates down to put an equal + # if the number of points is even, move y-coordinates down to put an equal # number of entries above and below the axis for row in list_of_rows: if bin_counter[row["bin"]] % 2 == 0: @@ -384,8 +384,8 @@ def swarm( # One way to make this code more flexible to e.g. handle multiple categories # would be to return a list of "swarmified" y coordinates here and then plot # outside the function. - # That generalization would let you "swarmify" y coordinates for each - # category and add category specific offsets to put the each category in its + # That generalization would let you "swarmify" y coordinates for each + # category and add category specific offsets to put the each category in its # own row fig = px.scatter( @@ -394,7 +394,7 @@ def swarm( y="y", title=fig_title, ) - # we want to suppress the y coordinate in the hover value because the + # we want to suppress the y coordinate in the hover value because the # y-coordinate is irrelevant/misleading fig.update_traces( marker_size=point_size, diff --git a/doc/python/line-charts.md b/doc/python/line-charts.md index 840abdfa76..ad355e0af4 100644 --- a/doc/python/line-charts.md +++ b/doc/python/line-charts.md @@ -62,7 +62,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true tags=[] diff --git a/doc/python/marker-style.md b/doc/python/marker-style.md index 7016143f24..a7bd085e7b 100644 --- a/doc/python/marker-style.md +++ b/doc/python/marker-style.md @@ -112,7 +112,7 @@ Fully opaque, the default setting, is useful for non-overlapping markers. When m [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true from IPython.display import IFrame diff --git a/doc/python/ml-knn.md b/doc/python/ml-knn.md index 28ff33469b..70f572dc05 100644 --- a/doc/python/ml-knn.md +++ b/doc/python/ml-knn.md @@ -240,7 +240,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/ml-regression.md b/doc/python/ml-regression.md index 5215058286..15b5f98170 100644 --- a/doc/python/ml-regression.md +++ b/doc/python/ml-regression.md @@ -95,7 +95,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/ml-roc-pr.md b/doc/python/ml-roc-pr.md index 8c4bd7e40d..71cc38389e 100644 --- a/doc/python/ml-roc-pr.md +++ b/doc/python/ml-roc-pr.md @@ -123,7 +123,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/multiple-axes.md b/doc/python/multiple-axes.md index 11cbf0261a..e792797c2d 100644 --- a/doc/python/multiple-axes.md +++ b/doc/python/multiple-axes.md @@ -79,7 +79,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/network-graphs.md b/doc/python/network-graphs.md index c9d85b5aa3..f28a697c32 100644 --- a/doc/python/network-graphs.md +++ b/doc/python/network-graphs.md @@ -157,7 +157,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash dash-cytoscape`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/pie-charts.md b/doc/python/pie-charts.md index c03e37aba6..7636a09987 100644 --- a/doc/python/pie-charts.md +++ b/doc/python/pie-charts.md @@ -68,7 +68,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true from IPython.display import IFrame diff --git a/doc/python/plot-data-from-csv.md b/doc/python/plot-data-from-csv.md index 1f1a30269b..b257aea9de 100644 --- a/doc/python/plot-data-from-csv.md +++ b/doc/python/plot-data-from-csv.md @@ -60,7 +60,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/plotly-express.md b/doc/python/plotly-express.md index f3cbf1d81d..73f402df5e 100644 --- a/doc/python/plotly-express.md +++ b/doc/python/plotly-express.md @@ -89,7 +89,7 @@ The Plotly Express API in general offers the following features: [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/renderers.md b/doc/python/renderers.md index bdf18301db..76874bd292 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -234,7 +234,7 @@ fig.show(renderer="png", width=800, height=300) [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/sankey-diagram.md b/doc/python/sankey-diagram.md index a014e5a508..7531c332ae 100644 --- a/doc/python/sankey-diagram.md +++ b/doc/python/sankey-diagram.md @@ -108,7 +108,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/setting-graph-size.md b/doc/python/setting-graph-size.md index 717c25341d..cfdf8e1f7e 100644 --- a/doc/python/setting-graph-size.md +++ b/doc/python/setting-graph-size.md @@ -55,7 +55,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true from IPython.display import IFrame diff --git a/doc/python/shapes.md b/doc/python/shapes.md index f14e2e7d3d..d8e79260c6 100644 --- a/doc/python/shapes.md +++ b/doc/python/shapes.md @@ -73,7 +73,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/subplots.md b/doc/python/subplots.md index b5711ee5de..ce16bdfedd 100644 --- a/doc/python/subplots.md +++ b/doc/python/subplots.md @@ -215,7 +215,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/table.md b/doc/python/table.md index 36a7ebcd1d..1262e6b21b 100644 --- a/doc/python/table.md +++ b/doc/python/table.md @@ -94,7 +94,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true from IPython.display import IFrame diff --git a/doc/python/text-and-annotations.md b/doc/python/text-and-annotations.md index 56f341e872..3ed95a6d63 100644 --- a/doc/python/text-and-annotations.md +++ b/doc/python/text-and-annotations.md @@ -107,7 +107,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true @@ -804,18 +804,18 @@ fig.update_layout( yref="container", y=0.005, # The "paper" x-coordinates lets us align this with either the right or left - # edge of the plot region. - # The code to align this flush with the right edge of the plot area is - # predictable and simple. + # edge of the plot region. + # The code to align this flush with the right edge of the plot area is + # predictable and simple. # Putting the title in the lower left corner, aligned with the left edge of the axis labeling would # require graph specific coordinate adjustments. xref="paper", xanchor="right", - x=1, + x=1, font=dict(size=12)), plot_bgcolor="white", - # We move the legend out of the right margin so the right-aligned note is + # We move the legend out of the right margin so the right-aligned note is # flush with the right most element of the graph. # Here we put the legend in a corner of the graph region # because it has consistent coordinates at all screen resolutions. @@ -827,18 +827,18 @@ fig.update_layout( borderwidth=1) ) -# Insert a title by repurposing an annotation +# Insert a title by repurposing an annotation fig.add_annotation( yref="paper", yanchor="bottom", - y=1.025, # y = 1 is the top of the plot area; the top is typically uncluttered, so placing + y=1.025, # y = 1 is the top of the plot area; the top is typically uncluttered, so placing # the bottom of the title slightly above the graph region works on a wide variety of graphs text="This title is a Plotly annotation", # Center the title horizontally over the plot area xref="paper", xanchor="center", - x=0.5, + x=0.5, showarrow=False, font=dict(size=18) diff --git a/doc/python/tick-formatting.md b/doc/python/tick-formatting.md index dafac06c58..d1f2d0c1a1 100644 --- a/doc/python/tick-formatting.md +++ b/doc/python/tick-formatting.md @@ -84,7 +84,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/tile-county-choropleth.md b/doc/python/tile-county-choropleth.md index 06f6bd7b2d..00162ecedd 100644 --- a/doc/python/tile-county-choropleth.md +++ b/doc/python/tile-county-choropleth.md @@ -107,7 +107,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true diff --git a/doc/python/time-series.md b/doc/python/time-series.md index bc3ee71df1..c0952d51e6 100644 --- a/doc/python/time-series.md +++ b/doc/python/time-series.md @@ -65,7 +65,7 @@ fig.show() [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. -Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & [deploy](https://plotly.com/dash/app-manager/) apps like this with Dash Enterprise.** +Get started with [the official Dash docs](https://dash.plotly.com/installation) and **learn how to effortlessly [style](https://plotly.com/dash/design-kit/) & publish apps like this with Dash Enterprise or Plotly Cloud.** ```python hide_code=true @@ -174,14 +174,14 @@ df = df.loc[(df["Date"]>= "2016-07-01") & (df["Date"] <= "2016-12-01")] fig = px.line(df, x='Date', y='AAPL.High') fig.update_xaxes(ticks= "outside", - ticklabelmode= "period", - tickcolor= "black", - ticklen=10, + ticklabelmode= "period", + tickcolor= "black", + ticklen=10, minor=dict( - ticklen=4, - dtick=7*24*60*60*1000, - tick0="2016-07-03", - griddash='dot', + ticklen=4, + dtick=7*24*60*60*1000, + tick0="2016-07-03", + griddash='dot', gridcolor='white') ) From 1b370d4b4c1b6258dc2c2aa1b67ac85945d761ad Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Wed, 8 Oct 2025 13:43:58 -0400 Subject: [PATCH 02/15] Update renderers.md --- doc/python/renderers.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 76874bd292..6132aebb7e 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -38,13 +38,14 @@ jupyter: Plotly's Python graphing library, `plotly.py`, gives you a wide range of options for how and where to display your figures. -In general, there are five different approaches you can take in order to display `plotly` figures: +In general, there are six different approaches you can take in order to display `plotly` figures: 1. Using the `renderers` framework in the context of a script or notebook (the main topic of this page) 2. Using [Dash](https://dash.plot.ly) in a web app context - 3. Using a [`FigureWidget` rather than a `Figure`](https://plotly.com/python/figurewidget/) in an [`ipywidgets` context](https://ipywidgets.readthedocs.io/en/stable/) - 4. By [exporting to an HTML file](https://plotly.com/python/interactive-html-export/) and loading that file in a browser immediately or later - 5. By [rendering the figure to a static image file using Kaleido](https://plotly.com/python/static-image-export/) such as PNG, JPEG, SVG, PDF or EPS and loading the resulting file in any viewer + 3. Using [Plotly Studio](https://plotly.com/studio) to generate charts using natural language + 4. Using a [`FigureWidget` rather than a `Figure`](https://plotly.com/python/figurewidget/) in an [`ipywidgets` context](https://ipywidgets.readthedocs.io/en/stable/) + 5. By [exporting to an HTML file](https://plotly.com/python/interactive-html-export/) and loading that file in a browser immediately or later + 6. By [rendering the figure to a static image file using Kaleido](https://plotly.com/python/static-image-export/) such as PNG, JPEG, SVG, PDF or EPS and loading the resulting file in any viewer Each of the first three approaches is discussed below. From 81c0ca7703d8d68ae7be2b8ad64574020b6302ad Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 11:42:23 -0400 Subject: [PATCH 03/15] add bullets and fix links --- doc/python/renderers.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 6132aebb7e..9afe42ab81 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -40,14 +40,14 @@ Plotly's Python graphing library, `plotly.py`, gives you a wide range of options In general, there are six different approaches you can take in order to display `plotly` figures: - 1. Using the `renderers` framework in the context of a script or notebook (the main topic of this page) - 2. Using [Dash](https://dash.plot.ly) in a web app context - 3. Using [Plotly Studio](https://plotly.com/studio) to generate charts using natural language - 4. Using a [`FigureWidget` rather than a `Figure`](https://plotly.com/python/figurewidget/) in an [`ipywidgets` context](https://ipywidgets.readthedocs.io/en/stable/) - 5. By [exporting to an HTML file](https://plotly.com/python/interactive-html-export/) and loading that file in a browser immediately or later - 6. By [rendering the figure to a static image file using Kaleido](https://plotly.com/python/static-image-export/) such as PNG, JPEG, SVG, PDF or EPS and loading the resulting file in any viewer + - Using the `renderers` framework in the context of a script or notebook (the main topic of this page) + - Using [Plotly Studio](https://plotly.com/studio) to generate charts using natural language + - Using [Dash](https://dash.plot.ly) in a web app context + - Using a [`FigureWidget` rather than a `Figure`](https://plotly.com/python/figurewidget/) in an [`ipywidgets` context](https://ipywidgets.readthedocs.io/en/stable/) + - By [exporting to an HTML file](https://plotly.com/python/interactive-html-export/) and loading that file in a browser immediately or later + - By [rendering the figure to a static image file using Kaleido](https://plotly.com/python/static-image-export/) such as PNG, JPEG, SVG, PDF or EPS and loading the resulting file in any viewer -Each of the first three approaches is discussed below. +Each of the first four approaches is discussed below. ### Displaying Figures Using The `renderers` Framework @@ -122,16 +122,16 @@ In this section, we will describe the built-in renderers so that you can choose Interactive renderers display figures using the plotly.js JavaScript library and are fully interactive, supporting pan, zoom, hover tooltips, etc. ###### `notebook` -This renderer is intended for use in the classic [Jupyter Notebook](https://jupyter.org/install.html) (not JupyterLab). The full plotly.js JavaScript library bundle is added to the notebook the first time a figure is rendered, so this renderer will work without an Internet connection. +This renderer is intended for use in the classic [Jupyter Notebook](https://jupyter.org/install.html) (not JupyterLab). The full plotly.js JavaScript library bundle is added to the notebook the first time a figure is rendered, so this renderer will work without an internet connection. -This renderer is a good choice for notebooks that will be exported to HTML files (Either using [nbconvert](https://nbconvert.readthedocs.io/en/latest/) or the "Download as HTML" menu action) because the exported HTML files will work without an Internet connection. +This renderer is a good choice for notebooks that will be exported to HTML files (Either using [nbconvert](https://nbconvert.readthedocs.io/en/latest/) or the "Download as HTML" menu action) because the exported HTML files will work without an internet connection. -> Note: Adding the plotly.js bundle to the notebook adds a few megabytes to the notebook size. If you can count on always having an Internet connection, you may want to consider using the `notebook_connected` renderer if notebook size is a constraint. +> Note: Adding the plotly.js bundle to the notebook adds a few megabytes to the notebook size. If you can count on always having an internet connection, you may want to consider using the `notebook_connected` renderer if notebook size is a constraint. ###### `notebook_connected` -This renderer is the same as `notebook` renderer, except the plotly.js JavaScript library bundle is loaded from an online CDN location. This saves a few megabytes in notebook size, but an Internet connection is required in order to display figures that are rendered this way. +This renderer is the same as `notebook` renderer, except the plotly.js JavaScript library bundle is loaded from an online CDN location. This saves a few megabytes in notebook size, but an internet connection is required in order to display figures that are rendered this way. -This renderer is a good choice for notebooks that will be shared with [nbviewer](https://nbviewer.jupyter.org/) since users must have an active Internet connection to access nbviewer in the first place. +This renderer is a good choice for notebooks that will be shared with [nbviewer](https://nbviewer.jupyter.org/) since users must have an active internet connection to access nbviewer in the first place. ###### `kaggle` and `azure` These are aliases for `notebook_connected` because this renderer is a good choice for use with [Kaggle kernels](https://www.kaggle.com/docs/notebooks) and [Azure Notebooks](https://notebooks.azure.com/). @@ -150,7 +150,7 @@ This renderer will open a figure in a browser tab using the default web browser. These renderers are the same as the `browser` renderer, but they force the use of a particular browser. ###### `iframe` and `iframe_connected` -These renderers write figures out as standalone HTML files and then display [`iframe`](https://www.w3schools.com/html/html_iframe.asp) elements that reference these HTML files. The `iframe` renderer will include the plotly.js JavaScript bundle in each HTML file that is written, while the `iframe_connected` renderer includes only a reference to an online CDN location from which to load plotly.js. Consequently, the `iframe_connected` renderer outputs files that are smaller than the `iframe` renderer, but it requires an Internet connection while the `iframe` renderer can operate offline. +These renderers write figures out as standalone HTML files and then display [`iframe`](https://www.w3schools.com/html/html_iframe.asp) elements that reference these HTML files. The `iframe` renderer will include the plotly.js JavaScript bundle in each HTML file that is written, while the `iframe_connected` renderer includes only a reference to an online CDN location from which to load plotly.js. Consequently, the `iframe_connected` renderer outputs files that are smaller than the `iframe` renderer, but it requires an internet connection while the `iframe` renderer can operate offline. This renderer may be useful when working with notebooks than contain lots of large figures. When using the `notebook` or `notebook_connected` renderer, all of the data for all of the figures in a notebook are stored inline in the notebook itself. If this would result in a prohibitively large notebook size, an `iframe` or `iframe_connected` renderer could be used instead. With the `iframe` renderers, the figure data are stored in the individual HTML files rather than in the notebook itself, resulting in a smaller notebook size. @@ -165,7 +165,7 @@ The `plotly_mimetype` renderer creates a specification of the figure (called a M These are aliases for `plotly_mimetype` since this renderer is a good choice when working in JupyterLab, nteract, and the Visual Studio Code notebook interface. Note that in VSCode Notebooks, the version of Plotly.js that is used to render is provided by the [vscode-python extension](https://code.visualstudio.com/docs/languages/python) and often trails the latest version by several weeks, so the latest features of `plotly` may not be available in VSCode right away. The situation is similar for Nteract. ##### Static Image Renderers -A set of renderers is provided for displaying figures as static images. See the [Static Image Export](https://plot.ly/python/static-image-export/) page for more information on getting set up. +A set of renderers is provided for displaying figures as static images. See the [Static Image Export](https://plotly.com/python/static-image-export/) page for more information on getting set up. ###### `png`, `jpeg`, and `svg` These renderers display figures as static `.png`, `.jpeg`, and `.svg` files, respectively. These renderers are useful for user interfaces that do not support inline HTML output, but do support inline static images. Examples include the [QtConsole](https://qtconsole.readthedocs.io/en/stable/), [Spyder](https://www.spyder-ide.org/), and the PyCharm [notebook interface](https://www.jetbrains.com/help/pycharm/jupyter-notebook-support.html). @@ -188,7 +188,7 @@ This renderer displays figures as static PDF files. This is especially useful fo In editors that support it (JupyterLab, nteract, and the Visual Studio Code notebook interface), this renderer displays the JSON representation of a figure in a collapsible interactive tree structure. This can be very useful for examining the structure of complex figures. ##### Multiple Renderers -You can specify that multiple renderers should be used by joining their names on `"+"` characters. This is useful when writing code that needs to support multiple contexts. For example, if a notebook specifies a default renderer string of `"notebook+plotly_mimetype+pdf"`then this notebook would be able to run in the classic Jupyter Notebook, in JupyterLab, and it would support being exported to PDF using `nbconvert`. +You can specify that multiple renderers should be used by joining their names on `"+"` characters. This is useful when writing code that needs to support multiple contexts. For example, if a notebook specifies a default renderer string of `"notebook+plotly_mimetype+pdf"` then this notebook would be able to run in the classic Jupyter Notebook, in JupyterLab, and it would support being exported to PDF using `nbconvert`. #### Customizing Built-In Renderers Most built-in renderers have configuration options to customize their behavior. To view a description of a renderer, including its configuration options, access the renderer object using dictionary-style key lookup on the `plotly.io.renderers` configuration object and then display it. Here is an example of accessing and displaying the `png` renderer. From 95174ca41a7ef79a35cfb5c8ec83a30077647488 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 11:44:42 -0400 Subject: [PATCH 04/15] Update renderers.md --- doc/python/renderers.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 9afe42ab81..457facf4a6 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -77,7 +77,7 @@ fig **In many contexts, an appropriate renderer will be chosen automatically and you will not need to perform any additional configuration.** These contexts include the classic [Jupyter Notebook](https://jupyter.org/), [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), [Visual Studio Code notebooks](https://code.visualstudio.com/docs/python/jupyter-support), [Google Colaboratory](https://colab.research.google.com/notebooks/intro.ipynb), [Kaggle](https://www.kaggle.com/kernels) notebooks, [Azure](https://notebooks.azure.com/) notebooks, and the [Python interactive shell](https://www.python.org/shell/). -Additional contexts are supported by choosing a compatible renderer including the [IPython console](https://docs.spyder-ide.org/ipythonconsole.html), [QtConsole](https://qtconsole.readthedocs.io/en/stable/), [Spyder](https://www.spyder-ide.org/), and more. +Additional contexts are supported by choosing a compatible renderer including [QtConsole](https://qtconsole.readthedocs.io/en/stable/), [Spyder](https://www.spyder-ide.org/), and more. Next, we will show how to configure the default renderer. After that, we will describe all of the built-in renderers and discuss why you might choose to use each one. @@ -85,7 +85,7 @@ Next, we will show how to configure the default renderer. After that, we will d #### Setting The Default Renderer -The current and available renderers are configured using the `plotly.io.renderers` configuration object. Display this object to see the current default renderer and the list of all available renderers. +The current and available renderers are configured using the `plotly.io.renderers` configuration object. Display this object to see the current default renderer and the list of all available renderers. ```python import plotly.io as pio @@ -94,13 +94,13 @@ pio.renderers The default renderer that you see when you display `pio.renderers` might be different than what is shown here. This is because `plotly.py` attempts to autodetect an appropriate renderer at startup. You can change the default renderer by assigning the name of an available renderer to the `pio.renderers.default` property. For example, to switch to the `'browser'` renderer, which opens figures in a tab of the default web browser, you would run the following. -> Note: Default renderers persist for the duration of a single session, but they do not persist across sessions. If you are working in an `IPython` kernel, this means that default renderers will persist for the life of the kernel, but they will not persist across kernel restarts. - ```python import plotly.io as pio pio.renderers.default = "browser" ``` +> Note: Default renderers persist for the duration of a single session. For example, if you set a default renderer in an `IPython` kernel, that default won't persist across kernel restarts. + It is also possible to set the default renderer using a system environment variable. At startup, `plotly.py` checks for the existence of an environment variable named `PLOTLY_RENDERER`. If this environment variable is set to the name of an available renderer, this renderer is set as the default. #### Overriding The Default Renderer From 1e1741319f0a0cb21b05887a3910c30d62d800ca Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 12:04:35 -0400 Subject: [PATCH 05/15] Update renderers.md --- doc/python/renderers.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 457facf4a6..665d9b0804 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -75,7 +75,7 @@ fig > To be precise, figures will display themselves using the current default renderer when the two following conditions are true. First, the last expression in a cell must evaluate to a figure. Second, `plotly.py` must be running from within an `IPython` kernel. -**In many contexts, an appropriate renderer will be chosen automatically and you will not need to perform any additional configuration.** These contexts include the classic [Jupyter Notebook](https://jupyter.org/), [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), [Visual Studio Code notebooks](https://code.visualstudio.com/docs/python/jupyter-support), [Google Colaboratory](https://colab.research.google.com/notebooks/intro.ipynb), [Kaggle](https://www.kaggle.com/kernels) notebooks, [Azure](https://notebooks.azure.com/) notebooks, and the [Python interactive shell](https://www.python.org/shell/). +**In many contexts, an appropriate renderer will be chosen automatically and you will not need to perform any additional configuration.** These contexts include the classic [Jupyter Notebook](https://jupyter.org/), [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), [Visual Studio Code notebooks](https://code.visualstudio.com/docs/python/jupyter-support), [Google Colab](https://colab.research.google.com/notebooks/intro.ipynb), [Kaggle](https://www.kaggle.com/kernels) notebooks, [Azure](https://notebooks.azure.com/) notebooks, and the [Python interactive shell](https://www.python.org/shell/). Additional contexts are supported by choosing a compatible renderer including [QtConsole](https://qtconsole.readthedocs.io/en/stable/), [Spyder](https://www.spyder-ide.org/), and more. @@ -104,7 +104,7 @@ pio.renderers.default = "browser" It is also possible to set the default renderer using a system environment variable. At startup, `plotly.py` checks for the existence of an environment variable named `PLOTLY_RENDERER`. If this environment variable is set to the name of an available renderer, this renderer is set as the default. #### Overriding The Default Renderer -It is also possible to override the default renderer temporarily by passing the name of an available renderer as the `renderer` keyword argument to the `show()` method. Here is an example of displaying a figure using the `svg` renderer (described below) without changing the default renderer. +You can override the default renderer temporarily by passing the name of an available renderer as the `renderer` keyword argument to a figure's `show()` method. For example, to use the `svg` renderer (described later) without changing the default renderer, set `renderer="svg"`: ```python import plotly.graph_objects as go @@ -134,7 +134,7 @@ This renderer is the same as `notebook` renderer, except the plotly.js JavaScrip This renderer is a good choice for notebooks that will be shared with [nbviewer](https://nbviewer.jupyter.org/) since users must have an active internet connection to access nbviewer in the first place. ###### `kaggle` and `azure` -These are aliases for `notebook_connected` because this renderer is a good choice for use with [Kaggle kernels](https://www.kaggle.com/docs/notebooks) and [Azure Notebooks](https://notebooks.azure.com/). +These are aliases for `notebook_connected` because this renderer is a good choice for use with [Kaggle Notebooks](https://www.kaggle.com/docs/notebooks) and [Azure Notebooks](https://notebooks.azure.com/). ###### `colab` This is a custom renderer for use with [Google Colab](https://colab.research.google.com). @@ -152,7 +152,7 @@ These renderers are the same as the `browser` renderer, but they force the use o ###### `iframe` and `iframe_connected` These renderers write figures out as standalone HTML files and then display [`iframe`](https://www.w3schools.com/html/html_iframe.asp) elements that reference these HTML files. The `iframe` renderer will include the plotly.js JavaScript bundle in each HTML file that is written, while the `iframe_connected` renderer includes only a reference to an online CDN location from which to load plotly.js. Consequently, the `iframe_connected` renderer outputs files that are smaller than the `iframe` renderer, but it requires an internet connection while the `iframe` renderer can operate offline. -This renderer may be useful when working with notebooks than contain lots of large figures. When using the `notebook` or `notebook_connected` renderer, all of the data for all of the figures in a notebook are stored inline in the notebook itself. If this would result in a prohibitively large notebook size, an `iframe` or `iframe_connected` renderer could be used instead. With the `iframe` renderers, the figure data are stored in the individual HTML files rather than in the notebook itself, resulting in a smaller notebook size. +This renderer may be useful when working with notebooks that contain lots of large figures. When using the `notebook` or `notebook_connected` renderer, all of the data for all of the figures in a notebook are stored inline in the notebook itself. If this would result in a prohibitively large notebook size, an `iframe` or `iframe_connected` renderer could be used instead. With the `iframe` renderers, the figure data are stored in the individual HTML files rather than in the notebook itself, resulting in a smaller notebook size. > Implementation Note: The HTML files written by the `iframe` renderers are stored in a subdirectory named `iframe_figures`. The HTML files are given names based on the execution number of the notebook cell that produced the figure. This means that each time a notebook kernel is restarted, any prior HTML files will be overwritten. This also means that you should not store multiple notebooks using an `iframe` renderer in the same directory, because this could result in figures from one notebook overwriting figures from another notebook. @@ -231,6 +231,10 @@ fig = go.Figure( fig.show(renderer="png", width=800, height=300) ``` +### Displaying figures in Plotly Studio + +Use [Plotly Studio](https://plotly.com/studio) to build data apps with Plotly figures using natural language and AI. Describe the charts you want to Plotly Studio, which generates them within a [Dash](https://plotly.com/dash/) app that you can publish to [Plotly Cloud](https://plotly.com/cloud/) or [Dash Enterprise](https://plotly.com/dash/). + ### Displaying figures in Dash [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. From 34b62e7d908e5eddbc6942dc7f75a061e6ef5626 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 12:31:35 -0400 Subject: [PATCH 06/15] Update renderers.md --- doc/python/renderers.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 665d9b0804..88f9688114 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -6,9 +6,9 @@ jupyter: extension: .md format_name: markdown format_version: '1.3' - jupytext_version: 1.14.1 + jupytext_version: 1.17.2 kernelspec: - display_name: Python 3 + display_name: Python 3 (ipykernel) language: python name: python3 language_info: @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.8.8 + version: 3.12.0 plotly: description: Displaying Figures using Plotly's Python graphing library display_as: file_settings @@ -235,6 +235,11 @@ fig.show(renderer="png", width=800, height=300) Use [Plotly Studio](https://plotly.com/studio) to build data apps with Plotly figures using natural language and AI. Describe the charts you want to Plotly Studio, which generates them within a [Dash](https://plotly.com/dash/) app that you can publish to [Plotly Cloud](https://plotly.com/cloud/) or [Dash Enterprise](https://plotly.com/dash/). +```python hide_code=true +from IPython.display import IFrame +IFrame('https://www.youtube.com/embed/ZGWMv7PQn-U?si=sRuSNPZWD1AzZsCf', width='100%', height=600) +``` + ### Displaying figures in Dash [Dash](https://plotly.com/dash/) is the best way to build analytical apps in Python using Plotly figures. To run the app below, run `pip install dash`, click "Download" to get the code and run `python app.py`. From 7eb2278b4a0c4ccbcff8df2725614ba8bf8233e1 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 13:03:11 -0400 Subject: [PATCH 07/15] Update renderers.md --- doc/python/renderers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 88f9688114..158519fbe1 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -237,7 +237,7 @@ Use [Plotly Studio](https://plotly.com/studio) to build data apps with Plotly fi ```python hide_code=true from IPython.display import IFrame -IFrame('https://www.youtube.com/embed/ZGWMv7PQn-U?si=sRuSNPZWD1AzZsCf', width='100%', height=600) +IFrame('https://www.youtube.com/embed/ZGWMv7PQn-U?si=sRuSNPZWD1AzZsCf&rel=0', width='100%', height=600) ``` ### Displaying figures in Dash From 4b73be571834afaa7a43b6509f0eeca6f3620b83 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 13:18:16 -0400 Subject: [PATCH 08/15] Update renderers.md --- doc/python/renderers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 158519fbe1..3bdc549670 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -237,7 +237,7 @@ Use [Plotly Studio](https://plotly.com/studio) to build data apps with Plotly fi ```python hide_code=true from IPython.display import IFrame -IFrame('https://www.youtube.com/embed/ZGWMv7PQn-U?si=sRuSNPZWD1AzZsCf&rel=0', width='100%', height=600) +IFrame('https://www.youtube.com/embed/ZGWMv7PQn-U?si=sRuSNPZWD1AzZsCf&mute=1', width='100%', height=600) ``` ### Displaying figures in Dash From 999840843c4babd6d178d99346921e22490e8f10 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 13:22:24 -0400 Subject: [PATCH 09/15] Update renderers.md --- doc/python/renderers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 3bdc549670..4323725cc8 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -236,8 +236,8 @@ fig.show(renderer="png", width=800, height=300) Use [Plotly Studio](https://plotly.com/studio) to build data apps with Plotly figures using natural language and AI. Describe the charts you want to Plotly Studio, which generates them within a [Dash](https://plotly.com/dash/) app that you can publish to [Plotly Cloud](https://plotly.com/cloud/) or [Dash Enterprise](https://plotly.com/dash/). ```python hide_code=true -from IPython.display import IFrame -IFrame('https://www.youtube.com/embed/ZGWMv7PQn-U?si=sRuSNPZWD1AzZsCf&mute=1', width='100%', height=600) +from IPython.display import HTML +HTML('') ``` ### Displaying figures in Dash From 5e9f27dfce8f610ecd520605449476c9bc06f405 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 13:44:51 -0400 Subject: [PATCH 10/15] Update renderers.md --- doc/python/renderers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 4323725cc8..f915caf223 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -237,7 +237,7 @@ Use [Plotly Studio](https://plotly.com/studio) to build data apps with Plotly fi ```python hide_code=true from IPython.display import HTML -HTML('') +HTML('') ``` ### Displaying figures in Dash From 16f6488a6c00298f460e77a5ca0f983dfc3afd42 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 14:02:04 -0400 Subject: [PATCH 11/15] Update renderers.md --- doc/python/renderers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index f915caf223..a189ae03b4 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -237,7 +237,7 @@ Use [Plotly Studio](https://plotly.com/studio) to build data apps with Plotly fi ```python hide_code=true from IPython.display import HTML -HTML('') +HTML('') ``` ### Displaying figures in Dash From 6429bd596971248b439bc8e38c0025c79be3e3a6 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 14:23:53 -0400 Subject: [PATCH 12/15] Update renderers.md --- doc/python/renderers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index a189ae03b4..5f9da52613 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -41,7 +41,7 @@ Plotly's Python graphing library, `plotly.py`, gives you a wide range of options In general, there are six different approaches you can take in order to display `plotly` figures: - Using the `renderers` framework in the context of a script or notebook (the main topic of this page) - - Using [Plotly Studio](https://plotly.com/studio) to generate charts using natural language + - Using [Plotly Studio](https://plotly.com/studio?utm_medium=graphing_libraries&utm_content=python_renderers) to generate charts using natural language - Using [Dash](https://dash.plot.ly) in a web app context - Using a [`FigureWidget` rather than a `Figure`](https://plotly.com/python/figurewidget/) in an [`ipywidgets` context](https://ipywidgets.readthedocs.io/en/stable/) - By [exporting to an HTML file](https://plotly.com/python/interactive-html-export/) and loading that file in a browser immediately or later @@ -233,7 +233,7 @@ fig.show(renderer="png", width=800, height=300) ### Displaying figures in Plotly Studio -Use [Plotly Studio](https://plotly.com/studio) to build data apps with Plotly figures using natural language and AI. Describe the charts you want to Plotly Studio, which generates them within a [Dash](https://plotly.com/dash/) app that you can publish to [Plotly Cloud](https://plotly.com/cloud/) or [Dash Enterprise](https://plotly.com/dash/). +Use [Plotly Studio](https://plotly.com/studio?utm_medium=graphing_libraries&utm_content=python_renderers) to build data apps with Plotly figures using natural language and AI. Describe the charts you want to Plotly Studio, which generates them within a [Dash](https://plotly.com/dash/?utm_medium=graphing_libraries&utm_content=python_renderers) app that you can publish to [Plotly Cloud](https://plotly.com/cloud/?utm_medium=graphing_libraries&utm_content=python_renderers) or [Dash Enterprise](https://plotly.com/dash/?utm_medium=graphing_libraries&utm_content=python_renderers). ```python hide_code=true from IPython.display import HTML From 4075efdfa34365832b2c6e69a1d3c19701ef91e8 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Thu, 9 Oct 2025 14:25:54 -0400 Subject: [PATCH 13/15] Update renderers.md --- doc/python/renderers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/python/renderers.md b/doc/python/renderers.md index 5f9da52613..601a9316e3 100644 --- a/doc/python/renderers.md +++ b/doc/python/renderers.md @@ -242,9 +242,9 @@ HTML('