Skip to content
10 changes: 5 additions & 5 deletions plotly/figure_factory/_hexbin_mapbox.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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",
Expand All @@ -462,15 +462,15 @@ def create_hexbin_mapbox(
opacity=opacity,
zoom=zoom,
center=center,
mapbox_style=mapbox_style,
map_style=mapbox_style,
title=title,
template=template,
width=width,
height=height,
)

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
Expand Down Expand Up @@ -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."],
),
)