From 4680f0406b7c243ee055d51da497511bb9a02ff7 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 3 Apr 2026 14:18:10 -0400 Subject: [PATCH 1/4] Update location-mode.md --- doc/python/location-mode.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/python/location-mode.md b/doc/python/location-mode.md index 4fd607ee9d..3e96147b69 100644 --- a/doc/python/location-mode.md +++ b/doc/python/location-mode.md @@ -6,7 +6,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.3' - jupytext_version: 1.17.2 + jupytext_version: 1.16.4 kernelspec: display_name: Python 3 (ipykernel) language: python @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.10.0 + version: 3.9.19 plotly: description: How to specify country codes, names, and US states for outline-based maps @@ -362,6 +362,24 @@ fig = px.choropleth( fig.show() ``` +*New in 6.7* + +You can also use full state names in `locations` when `locationmode='USA-states'`: + +```python +import plotly.express as px + +fig = px.choropleth( + locations=['California', 'Texas', 'New York', 'Florida', 'Illinois'], + locationmode='USA-states', + color=[95, 88, 92, 85, 78], + scope='usa', + color_continuous_scale='Reds', + title='USA States Choropleth with State Names' +) +fig.show() +``` + ## Supported US State Codes The following state codes are supported when `locationmode='USA-states'`: From fcb8a84004c401ae72b18c97d168db0ef8359ae9 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 3 Apr 2026 14:34:33 -0400 Subject: [PATCH 2/4] add notifications example --- doc/python/configuration-options.md | 17 +++++++++++++++-- plotly/offline/offline.py | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/python/configuration-options.md b/doc/python/configuration-options.md index fdb1bde337..5b8c1b2d93 100644 --- a/doc/python/configuration-options.md +++ b/doc/python/configuration-options.md @@ -6,7 +6,7 @@ jupyter: extension: .md format_name: markdown format_version: '1.3' - jupytext_version: 1.17.2 + jupytext_version: 1.16.4 kernelspec: display_name: Python 3 (ipykernel) language: python @@ -20,7 +20,7 @@ jupyter: name: python nbconvert_exporter: python pygments_lexer: ipython3 - version: 3.12.4 + version: 3.9.19 plotly: description: How to set the configuration options of figures using the Plotly Python graphing library. @@ -359,6 +359,19 @@ fig = go.Figure( fig.show() ``` +### Hiding Notifications + +*New in 6.7* + +By default, Plotly displays a notification in the top-right corner of the plot for actions such as downloading the plot. Set `displayNotifier` to `False` to hide these notifications. + +```python +import plotly.express as px + +fig = px.scatter(x=[1, 2, 3], y=[1, 3, 2]) +fig.show(config={"displayNotifier": False}) +``` + ### Configuring Figures in Dash Apps The same configuration dictionary that you pass to the `config` parameter of the `show()` method can also be passed to the [`config` property of a `dcc.Graph` component](https://dash.plotly.com/dash-core-components/graph). diff --git a/plotly/offline/offline.py b/plotly/offline/offline.py index 615202f357..f038da8334 100644 --- a/plotly/offline/offline.py +++ b/plotly/offline/offline.py @@ -140,6 +140,7 @@ def _get_jconfig(config=None): "locale", "locales", "doubleClickDelay", + "displayNotifier", ) if config and isinstance(config, dict): From 97f4030dc4126d3a1970fac1ee7459c8fc942451 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 3 Apr 2026 14:51:29 -0400 Subject: [PATCH 3/4] add note on locations as full state names --- doc/python/choropleth-maps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/python/choropleth-maps.md b/doc/python/choropleth-maps.md index b8d0098640..a169975820 100644 --- a/doc/python/choropleth-maps.md +++ b/doc/python/choropleth-maps.md @@ -229,7 +229,7 @@ fig = px.choropleth(df, locations="iso_alpha", fig.show() ``` -To use the USA States geometry, set `locationmode='USA-states'` and provide `locations` as [two-letter state abbreviations](/python/outline-map-locations/#supported-us-state-codes): +To use the USA States geometry, set `locationmode='USA-states'` and provide `locations` as [two-letter state abbreviations](/python/outline-map-locations/#supported-us-state-codes) or [full state names](/python/outline-map-locations/#locationmode='USA-states'): ```python import plotly.express as px From dbe34ad014fbd98195a4cba28354d680975f79d4 Mon Sep 17 00:00:00 2001 From: Liam Connors Date: Fri, 3 Apr 2026 14:51:37 -0400 Subject: [PATCH 4/4] update config example --- doc/python/configuration-options.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/python/configuration-options.md b/doc/python/configuration-options.md index 5b8c1b2d93..4bfebf674b 100644 --- a/doc/python/configuration-options.md +++ b/doc/python/configuration-options.md @@ -363,13 +363,16 @@ fig.show() *New in 6.7* -By default, Plotly displays a notification in the top-right corner of the plot for actions such as downloading the plot. Set `displayNotifier` to `False` to hide these notifications. +Plotly displays a notification in the top-right corner of the plot when downloading the plot as an image, when first clicking a legend item, and when zooming in. Set `displayNotifier` to `False` to hide these notifications. ```python import plotly.express as px -fig = px.scatter(x=[1, 2, 3], y=[1, 3, 2]) -fig.show(config={"displayNotifier": False}) +df = px.data.iris() +fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species") + +config = {"displayNotifier": True} +fig.show(config=config) ``` ### Configuring Figures in Dash Apps