The reason I ask is that I notice that when I pan on a heatmap, the density changes. Below are some screenshot examples, the only difference being I panned between screenshots (not zoom). I assume it’s a random seed thing? If not, is there a way to ensure a consistent output?
Hi @r4ch45 welcome to the forum! Unfortunately I can’t reproduce the issue with the documentation examples, even when setting the radius. Any chance that you could share some minimal code and data reproducing the issue? Could you also tell us which version of plotly.py you are using?
Sure thing - thanks! The documentation example has the same issue for me when the radius is reduced from 10, and you zoom into an area. I’m on version 4.6.0.
import pandas as pd
quakes = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv')
import plotly.graph_objects as go
fig = go.Figure(go.Densitymapbox(lat=quakes.Latitude, lon=quakes.Longitude, z=quakes.Magnitude,
radius=3))
fig.update_layout(mapbox_style="stamen-terrain", mapbox_center_lon=180)
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
fig.show()
Hum still can’t reproduce (On Firefox). Which browser are you using? Did you try with another browser (you can use the documentation examples with the binder links if you don’t want to set up the notebook with another browser)?
Damn, I’m on Chrome 80.0.3987.163 (on a locked down machine without Firefox annoyingly). Ran a binder from the docs on Chrome with radius=3 for fun and still getting same issue. Same issue on IE but not sure that says much.
wow this is weird because I don’t get the issue on Chrome (with radius=3). It’d be great if someone else here could give it a try and see if they can reproduce the issue.