Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49,612 changes: 18,432 additions & 31,180 deletions codegen/resources/plot-schema.json

Large diffs are not rendered by default.

2,793 changes: 1,146 additions & 1,647 deletions js/lib/mimeExtension.js

Large diffs are not rendered by default.

241 changes: 77 additions & 164 deletions js/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"lodash-es": "^4.17.21",
"plotly.js": "3.6.0",
"plotly.js": "4.0.0-rc.0",
"@lumino/widgets": "~2.4.0"
},
"devDependencies": {
Expand Down
5 changes: 2 additions & 3 deletions plotly/_subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# little differently.
import collections

_single_subplot_types = {"scene", "geo", "polar", "ternary", "map", "mapbox"}
_single_subplot_types = {"scene", "geo", "polar", "ternary", "map"}
_subplot_types = set.union(_single_subplot_types, {"xy", "domain"})

# For most subplot types, a trace is associated with a particular subplot
Expand All @@ -20,7 +20,7 @@
# the trace property is just named `subplot`. For example setting
# the `scatterpolar.subplot` property to `polar3` associates the scatterpolar
# trace with the third polar subplot in the figure
_subplot_prop_named_subplot = {"polar", "ternary", "map", "mapbox"}
_subplot_prop_named_subplot = {"polar", "ternary", "map"}


# Named tuple to hold an xaxis/yaxis pair that represent a single subplot
Expand Down Expand Up @@ -152,7 +152,6 @@ def make_subplots(
- 'polar': Polar subplot for scatterpolar, barpolar, etc.
- 'ternary': Ternary subplot for scatterternary
- 'map': Map subplot for scattermap, choroplethmap and densitymap
- 'mapbox': Mapbox subplot for scattermapbox, choroplethmapbox and densitymapbox
- 'domain': Subplot type for traces that are individually
positioned. pie, parcoords, parcats, etc.
- trace type: A trace type which will be used to determine
Expand Down
2 changes: 1 addition & 1 deletion plotly/basedatatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,7 @@ def get_subplot(self, row, col, secondary_y=False):
* plotly.graph_objs.layout.Scene: if subplot type is 'scene'
* plotly.graph_objs.layout.Polar: if subplot type is 'polar'
* plotly.graph_objs.layout.Ternary: if subplot type is 'ternary'
* plotly.graph_objs.layout.Mapbox: if subplot type is 'ternary'
* plotly.graph_objs.layout.Map: if subplot type is 'map'
* SubplotDomain namedtuple with `x` and `y` fields:
if subplot type is 'domain'.
- x: length 2 list of the subplot start and stop width
Expand Down
10 changes: 0 additions & 10 deletions plotly/express/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@
scatter_polar,
scatter_ternary,
scatter_map,
scatter_mapbox,
scatter_geo,
line,
line_3d,
line_polar,
line_ternary,
line_map,
line_mapbox,
line_geo,
area,
bar,
Expand All @@ -62,14 +60,11 @@
funnel,
funnel_area,
choropleth_map,
choropleth_mapbox,
density_map,
density_mapbox,
)


from ._core import ( # noqa: F401
set_mapbox_access_token,
defaults,
get_trendline_results,
NO_COLOR,
Expand All @@ -85,19 +80,16 @@
"scatter_polar",
"scatter_ternary",
"scatter_map",
"scatter_mapbox",
"scatter_geo",
"scatter_matrix",
"density_contour",
"density_heatmap",
"density_map",
"density_mapbox",
"line",
"line_3d",
"line_polar",
"line_ternary",
"line_map",
"line_mapbox",
"line_geo",
"parallel_coordinates",
"parallel_categories",
Expand All @@ -112,7 +104,6 @@
"ecdf",
"choropleth",
"choropleth_map",
"choropleth_mapbox",
"pie",
"sunburst",
"treemap",
Expand All @@ -123,7 +114,6 @@
"data",
"colors",
"trendline_functions",
"set_mapbox_access_token",
"get_trendline_results",
"IdentityMap",
"Constant",
Expand Down
187 changes: 0 additions & 187 deletions plotly/express/_chart_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,193 +1406,6 @@ def line_map(
line_map.__doc__ = make_docstring(line_map)


def scatter_mapbox(
data_frame=None,
lat=None,
lon=None,
color=None,
text=None,
hover_name=None,
hover_data=None,
custom_data=None,
size=None,
animation_frame=None,
animation_group=None,
category_orders=None,
labels=None,
color_discrete_sequence=None,
color_discrete_map=None,
color_continuous_scale=None,
range_color=None,
color_continuous_midpoint=None,
opacity=None,
size_max=None,
zoom=8,
center=None,
mapbox_style=None,
title=None,
subtitle=None,
template=None,
width=None,
height=None,
) -> go.Figure:
"""
*scatter_mapbox* is deprecated! Use *scatter_map* instead.
Learn more at: https://plotly.com/python/mapbox-to-maplibre/
In a Mapbox scatter plot, each row of `data_frame` is represented by a
symbol mark on a Mapbox map.
"""
warn(
"*scatter_mapbox* is deprecated!"
+ " Use *scatter_map* instead."
+ " Learn more at: https://plotly.com/python/mapbox-to-maplibre/",
stacklevel=2,
category=DeprecationWarning,
)
return make_figure(args=locals(), constructor=go.Scattermapbox)


scatter_mapbox.__doc__ = make_docstring(scatter_mapbox)


def choropleth_mapbox(
data_frame=None,
geojson=None,
featureidkey=None,
locations=None,
color=None,
hover_name=None,
hover_data=None,
custom_data=None,
animation_frame=None,
animation_group=None,
category_orders=None,
labels=None,
color_discrete_sequence=None,
color_discrete_map=None,
color_continuous_scale=None,
range_color=None,
color_continuous_midpoint=None,
opacity=None,
zoom=8,
center=None,
mapbox_style=None,
title=None,
subtitle=None,
template=None,
width=None,
height=None,
) -> go.Figure:
"""
*choropleth_mapbox* is deprecated! Use *choropleth_map* instead.
Learn more at: https://plotly.com/python/mapbox-to-maplibre/
In a Mapbox choropleth map, each row of `data_frame` is represented by a
colored region on a Mapbox map.
"""
warn(
"*choropleth_mapbox* is deprecated!"
+ " Use *choropleth_map* instead."
+ " Learn more at: https://plotly.com/python/mapbox-to-maplibre/",
stacklevel=2,
category=DeprecationWarning,
)
return make_figure(args=locals(), constructor=go.Choroplethmapbox)


choropleth_mapbox.__doc__ = make_docstring(choropleth_mapbox)


def density_mapbox(
data_frame=None,
lat=None,
lon=None,
z=None,
hover_name=None,
hover_data=None,
custom_data=None,
animation_frame=None,
animation_group=None,
category_orders=None,
labels=None,
color_continuous_scale=None,
range_color=None,
color_continuous_midpoint=None,
opacity=None,
zoom=8,
center=None,
mapbox_style=None,
radius=None,
title=None,
subtitle=None,
template=None,
width=None,
height=None,
) -> go.Figure:
"""
*density_mapbox* is deprecated! Use *density_map* instead.
Learn more at: https://plotly.com/python/mapbox-to-maplibre/
In a Mapbox density map, each row of `data_frame` contributes to the intensity of
the color of the region around the corresponding point on the map
"""
warn(
"*density_mapbox* is deprecated!"
+ " Use *density_map* instead."
+ " Learn more at: https://plotly.com/python/mapbox-to-maplibre/",
stacklevel=2,
category=DeprecationWarning,
)
return make_figure(
args=locals(), constructor=go.Densitymapbox, trace_patch=dict(radius=radius)
)


density_mapbox.__doc__ = make_docstring(density_mapbox)


def line_mapbox(
data_frame=None,
lat=None,
lon=None,
color=None,
text=None,
hover_name=None,
hover_data=None,
custom_data=None,
line_group=None,
animation_frame=None,
animation_group=None,
category_orders=None,
labels=None,
color_discrete_sequence=None,
color_discrete_map=None,
zoom=8,
center=None,
mapbox_style=None,
title=None,
subtitle=None,
template=None,
width=None,
height=None,
) -> go.Figure:
"""
*line_mapbox* is deprecated! Use *line_map* instead.
Learn more at: https://plotly.com/python/mapbox-to-maplibre/
In a Mapbox line plot, each row of `data_frame` is represented as
a vertex of a polyline mark on a Mapbox map.
"""
warn(
"*line_mapbox* is deprecated!"
+ " Use *line_map* instead."
+ " Learn more at: https://plotly.com/python/mapbox-to-maplibre/",
stacklevel=2,
category=DeprecationWarning,
)
return make_figure(args=locals(), constructor=go.Scattermapbox)


line_mapbox.__doc__ = make_docstring(line_mapbox)


def scatter_matrix(
data_frame=None,
dimensions=None,
Expand Down
Loading
Loading