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 diff --git a/doc/python/configuration-options.md b/doc/python/configuration-options.md index fdb1bde337..4bfebf674b 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,22 @@ fig = go.Figure( fig.show() ``` +### Hiding Notifications + +*New in 6.7* + +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 + +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 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/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'`: 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):