Skip to content

Commit 4680f04

Browse files
committed
Update location-mode.md
1 parent 600f865 commit 4680f04

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

doc/python/location-mode.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.3'
9-
jupytext_version: 1.17.2
9+
jupytext_version: 1.16.4
1010
kernelspec:
1111
display_name: Python 3 (ipykernel)
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.10.0
23+
version: 3.9.19
2424
plotly:
2525
description: How to specify country codes, names, and US states for outline-based
2626
maps
@@ -362,6 +362,24 @@ fig = px.choropleth(
362362
fig.show()
363363
```
364364

365+
*New in 6.7*
366+
367+
You can also use full state names in `locations` when `locationmode='USA-states'`:
368+
369+
```python
370+
import plotly.express as px
371+
372+
fig = px.choropleth(
373+
locations=['California', 'Texas', 'New York', 'Florida', 'Illinois'],
374+
locationmode='USA-states',
375+
color=[95, 88, 92, 85, 78],
376+
scope='usa',
377+
color_continuous_scale='Reds',
378+
title='USA States Choropleth with State Names'
379+
)
380+
fig.show()
381+
```
382+
365383
## Supported US State Codes
366384

367385
The following state codes are supported when `locationmode='USA-states'`:

0 commit comments

Comments
 (0)