Skip to content

Commit a5520f9

Browse files
promote geo.fitbounds and geo.visible to PX
1 parent 01b256b commit a5520f9

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

Diff for: CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1111
## [4.13.0] - UNRELEASED
1212

1313
### Added
14-
- `px.choropleth`, `px.scatter_geo` and `px.line_geo` now support faceting [2923](https://github.com/plotly/plotly.py/pull/2923)
14+
- `px.choropleth`, `px.scatter_geo` and `px.line_geo` now support faceting as well as `fitbounds` and `basemap_visible` [2923](https://github.com/plotly/plotly.py/pull/2923)
1515
- `px.scatter_geo` and `px.line_geo` now support `geojson`/`featureidkey` input [2923](https://github.com/plotly/plotly.py/pull/2923)
1616
- `px.scatter_geo` now supports `symbol` [2923](https://github.com/plotly/plotly.py/pull/2923)
1717
- `go.Figure` now has a `set_subplots` method to set subplots on an already

Diff for: packages/python/plotly/plotly/express/_chart_types.py

+6
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,8 @@ def choropleth(
960960
projection=None,
961961
scope=None,
962962
center=None,
963+
fitbounds=None,
964+
basemap_visible=None,
963965
title=None,
964966
template=None,
965967
width=None,
@@ -1015,6 +1017,8 @@ def scatter_geo(
10151017
projection=None,
10161018
scope=None,
10171019
center=None,
1020+
fitbounds=None,
1021+
basemap_visible=None,
10181022
title=None,
10191023
template=None,
10201024
width=None,
@@ -1065,6 +1069,8 @@ def line_geo(
10651069
projection=None,
10661070
scope=None,
10671071
center=None,
1072+
fitbounds=None,
1073+
basemap_visible=None,
10681074
title=None,
10691075
template=None,
10701076
width=None,

Diff for: packages/python/plotly/plotly/express/_core.py

+2
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,8 @@ def configure_geo(args, fig, orders):
691691
fig.update_geos(
692692
center=args["center"],
693693
scope=args["scope"],
694+
fitbounds=args["fitbounds"],
695+
visible=args["basemap_visible"],
694696
projection=dict(type=args["projection"]),
695697
)
696698

Diff for: packages/python/plotly/plotly/express/_doc.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,11 @@
475475
"If `True`, an extra line segment is drawn between the first and last point.",
476476
],
477477
line_shape=["str (default `'linear'`)", "One of `'linear'` or `'spline'`."],
478+
fitbounds=["str (default `False`).", "One of `False`, `locations` or `geojson`."],
479+
basemap_visible=["bool", "Force the basemap visibility."],
478480
scope=[
479481
"str (default `'world'`).",
480-
"One of `'world'`, `'usa'`, `'europe'`, `'asia'`, `'africa'`, `'north america'`, or `'south america'`)"
482+
"One of `'world'`, `'usa'`, `'europe'`, `'asia'`, `'africa'`, `'north america'`, or `'south america'`"
481483
"Default is `'world'` unless `projection` is set to `'albers usa'`, which forces `'usa'`.",
482484
],
483485
projection=[

0 commit comments

Comments
 (0)