I am plotting a gps track on a mapbox with line_mapbox. I would like to plot lines between points with the color representing a speed value. That is the color scale represent the speed value of the resulting vector. However, when plotting the map, the function separates points with different colors in different categories and then plot a different trace for each color, that is for each speed values. As a result I have different traces each one with a specific color and not a unique trace with vectors of different color.
Someone had the same problem? Thanks for your help!
fig = px.line_mapbox(gdf, lat="lat", lon="lng", hover_name="time", hover_data=["speed", "vmg"], color = "colorVal", color_discrete_map=discr_map, zoom=zoomOnWater, center = dcCenter)