Hi
I am trying to be able to achieve different marker symbols for the scattermapbox plot. I can achieve this using last example on this page https://plotly.com/python/scattermapbox/ . I further want to be able to change the size of the markers based using a list of marker sizes. I am struggling with this.
I am aware that plotly’s marker.size and marker.colour does not work with any marker other than circle. However, my marker symbol list contains all circle but one. Now I want to be able to achieve different sizes of these circle markers. Please help how I can achieve this. Below is the code that I am using. I always get the same size for all markers, no matter what the size list looks like.
It would be great if you could help. Thanks in advance.
Code:
import plotly.graph_objects as go
token = mapbox.token
fig = go.Figure(go.Scattermapbox(
mode = “markers+text+lines”,
lon = [-75, -80, -50], lat = [45, 20, -20],
marker = {‘size’: [20,25,30], ‘symbol’: [“bus”, “circle”, “circle”]},
textposition = “bottom right”))
fig.update_layout(
mapbox = {
‘accesstoken’: token,
‘style’: “outdoors”, ‘zoom’: 0.7},
showlegend = False)
fig.show()