keddad
keddad

Reputation: 1806

Make colors represent individual point instead of area in Plotly Densitymapbox

I've got some kind of Densitymapbox plot, plotted by this code:

fig = go.Figure(go.Densitymapbox(
    lon=x,
    lat=y,
    z=floors,
    radius=10,
    colorscale="plasma"
))
fig.update_layout(mapbox_style="open-street-map", mapbox_center_lon=37.52, mapbox_center_lat=55.75)
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0}, width = 800, height = 700)
fig.show()

It looks like this: Plot

But there is a problem. Colorbar goes up to 70 and points in center are yellow as if they were near 70 too. Thing is they are mostly very small, about 10, so this yellow color appears to be some kind of sum of them instead of representing individual point. How do I change this behavior and make plotly color it based on individual colors?

Upvotes: 0

Views: 551

Answers (1)

keddad
keddad

Reputation: 1806

Well, as @nicolaskruchten said, I gust picked wrong plot type. Use Scattermapbox instead.

Upvotes: 1

Related Questions