From 7c589f8852ed58bbc53cec4049614dc0d686a04e Mon Sep 17 00:00:00 2001 From: Aaron Epel Date: Wed, 1 Oct 2025 12:21:08 -0400 Subject: [PATCH 1/2] Refactored create_hexbin_mapbox to use *_map chart types instead of *_mapbox --- plotly/figure_factory/_hexbin_mapbox.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plotly/figure_factory/_hexbin_mapbox.py b/plotly/figure_factory/_hexbin_mapbox.py index c76352248b0..1eec4a775dd 100644 --- a/plotly/figure_factory/_hexbin_mapbox.py +++ b/plotly/figure_factory/_hexbin_mapbox.py @@ -1,6 +1,6 @@ from plotly.express._core import build_dataframe from plotly.express._doc import make_docstring -from plotly.express._chart_types import choropleth_mapbox, scatter_mapbox +from plotly.express._chart_types import choropleth_map, scatter_map import narwhals.stable.v1 as nw import numpy as np @@ -446,7 +446,7 @@ def create_hexbin_mapbox( if range_color is None: range_color = [agg_data_frame["color"].min(), agg_data_frame["color"].max()] - fig = choropleth_mapbox( + fig = choropleth_map( data_frame=agg_data_frame.to_native(), geojson=geojson, locations="locations", @@ -462,7 +462,7 @@ def create_hexbin_mapbox( opacity=opacity, zoom=zoom, center=center, - mapbox_style=mapbox_style, + map_style=mapbox_style, title=title, template=template, width=width, @@ -470,7 +470,7 @@ def create_hexbin_mapbox( ) if show_original_data: - original_fig = scatter_mapbox( + original_fig = scatter_map( data_frame=( args["data_frame"].sort( by=args["animation_frame"], descending=False, nulls_last=True From b9a271d2d3012eadd4ed9d1b800573845093fe3f Mon Sep 17 00:00:00 2001 From: Aaron Epel Date: Wed, 1 Oct 2025 12:27:08 -0400 Subject: [PATCH 2/2] Updated create_hexbin_mapbox docstring --- plotly/figure_factory/_hexbin_mapbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/figure_factory/_hexbin_mapbox.py b/plotly/figure_factory/_hexbin_mapbox.py index 1eec4a775dd..b8b32d75c86 100644 --- a/plotly/figure_factory/_hexbin_mapbox.py +++ b/plotly/figure_factory/_hexbin_mapbox.py @@ -521,6 +521,6 @@ def create_hexbin_mapbox( "bool", "Whether to show the original data on top of the hexbin aggregation.", ], - original_data_marker=["dict", "Scattermapbox marker options."], + original_data_marker=["dict", "Scattermap marker options."], ), )