Skip to content

Commit e9c8343

Browse files
authored
Merge pull request #889 from NgangaKamau3/fix-plotly-warnings
Fix deprecated Plotly API calls in anoph (Mapbox and Trace methods)
2 parents 9e5d989 + 6a26695 commit e9c8343

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

malariagen_data/anoph/dipclust.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,10 @@ def _dipclust_concat_subplots(
542542
if isinstance(figure, go.Figure):
543543
# This is a figure, access the traces within it.
544544
for trace in range(len(figure["data"])):
545-
fig.append_trace(figure["data"][trace], row=i + 1, col=1)
545+
fig.add_trace(figure["data"][trace], row=i + 1, col=1)
546546
else:
547547
# Assume this is a trace, add directly.
548-
fig.append_trace(figure, row=i + 1, col=1)
548+
fig.add_trace(figure, row=i + 1, col=1)
549549

550550
fig.update_xaxes(visible=False)
551551
fig.update_layout(

malariagen_data/anoph/sample_metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,11 +1569,11 @@ def plot_sample_location_mapbox(
15691569
# Sort by `color` column by default, which can be overridden via category_orders.
15701570
df_locations = df_samples[location_columns].drop_duplicates().sort_values(color)
15711571

1572-
fig = px.scatter_mapbox(
1572+
fig = px.scatter_map(
15731573
df_locations,
15741574
lat="latitude",
15751575
lon="longitude",
1576-
mapbox_style="open-street-map",
1576+
map_style="open-street-map",
15771577
zoom=zoom,
15781578
color=color,
15791579
category_orders=category_orders,

0 commit comments

Comments
 (0)