A simple scatterplot can be created as follows:
a, b = np.random.lognormal(size=(2,500))
fig = go.FigureWidget() trace = fig.add_scatter(x=a, y=b, mode='markers', marker=dict(size=10), opacity=0.2) fig
I would like there to be a darker hue for the regions where the concentration is higher.
I can achieve that if I plot each point separately:
X = zip(a, b)
fig = go.FigureWidget() for el in X: fig.add_scatter(x=[el],y=[el], marker=dict(size=10, color=trace.marker.color), opacity=0.2) fig.layout.update(showlegend=False) fig
Plotting each point separately seems to be somewhat inefficient.
Question: How can I achieve the same result without having to plot each point separately.
I’ve just upgraded to 4.0.0 and it seems that I can’t use
How can I get the color of