In Plotly, using Scattermapbox, is there a way to display some text above and below the markers?
Currently the text only appears when I hover on the markers, and the plot shows only part of the text that I would like to display.
My input data frame df_area
is as follows. I would like to display the text contained in both the name
column and in the forecast
column.
name latitude longitude forecast
0 "AK" 2.675000 203.139000 "Cloudy"
1 "Bd" 2.621000 203.224000 "Cloudy"
However, I can currently only display the text in the forecast
column.
fig = go.Figure(go.Scattermapbox(
lat=df_area["latitude"],
lon=df_area["longitude"],
mode="markers+text",
marker={"size": 10},
text=df_area["forecast"]))