title: Plotly Scattermapbox, unable to add text to markers
body: <p>I am trying to add text to the plotly map below, original code modified from <a href="https://plotly.com/python/lines-on-mapbox/" rel="nofollow noreferrer">https://plotly.com/python/lines-on-mapbox/</a></p>
  <pre><code>import plotly.graph_objects as go
  
  fig = go.Figure(go.Scattermapbox(
      mode = &quot;markers&quot;,
  
      marker = {'size': 10}))
  
  fig.add_trace(go.Scattermapbox(
      mode = &quot;markers&quot;,
      lon = longlist,
      lat = latlist,
      marker = {'size': 10}))
  
  
  
  fig.update_layout(
      margin ={'l':0,'t':0,'b':0,'r':0},
      mapbox = {
          
          'style': &quot;stamen-terrain&quot;,
          'center': {'lon': -20, 'lat': -20},
          'zoom': 1})
  
  fig.show()
  </code></pre>
  <p><a href="https://i.stack.imgur.com/qUffb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qUffb.jpg" alt="enter image description here" /></a>
  I have tried to copy the solution provided at <a href="https://stackoverflow.com/questions/62240079/plotly-scattermapbox-is-there-a-way-to-include-some-text-above-and-below-the-ma">Plotly Scattermapbox: Is there a way to include some text above and below the markers?</a></p>
  <p>See my edited code below which includes new text code to retrieve data from magnitudelist and new code for mapbox_access_token</p>
  <pre><code>import plotly.graph_objects as go
  
  mapbox_access_token = 'mytoken'
  
  
  fig = go.Figure(go.Scattermapbox(
      mode = &quot;markers&quot;,
  
      marker = {'size': 10}))
  
  data = fig.add_trace(go.Scattermapbox(
      mode = &quot;markers&quot;,
      lon = longlist,
      lat = latlist,
      marker = {'size': 10},
      textposition='top right',
      textfont=dict(size=16, color='black'),
      text = magnitudelist
  ))
  
  
  layout = dict(margin=dict(l=0, t=0, r=0, b=0, pad=0),
                mapbox=dict(accesstoken=mapbox_access_token,
                            center=dict(lat=-20, lon=-20),
                            style='stamen-terrain',
                            zoom=1))
  
  
  fig = go.Figure(data=data, layout=layout)
  fig.show()
  </code></pre>
  <p>Result blank
  <a href="https://i.stack.imgur.com/EJSXY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EJSXY.png" alt="enter image description here" /></a></p>
  <p>I am trying to get a result more like this</p>
  <p><a href="https://i.stack.imgur.com/WTKCK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WTKCK.png" alt="enter image description here" /></a></p>
  <p>Any suggestions would be appreciated</p>