I am new to plotly and I am trying to draw some roads on a map in different colors based on the traffic value.
This is what I tried:
fig = px.line_mapbox(lat=test_lat, lon=test_long, hover_name=test_name,mapbox_style = 'carto-positron',color =test_trafic)
fig.show()
Where test_lat is an array with latitudes points, test_long is an array with longitudes, test_name are the names of the streets and test_trafic are the values of traffic.
The problem is that, when I run it, although the streets appear correctly on the map, plotly connects all the lines between them like this:
Is there a way to fix this?
question from:
https://stackoverflow.com/questions/65598624/how-to-make-plotly-express-line-lines-not-to-connect-between-one-another 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…