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[0]],y=[el[1]], marker=dict(size=10, color=trace.marker.color), opacity=0.2)
fig.layout.update(showlegend=False)
fig
@ursus, You can get the same result by using the marker’s opacity attribute instead of the trace’s. fig.add_scatter(x=a, y=b, mode='markers', marker=dict(size=10, opacity=0.2)).
Also, starting in version 4 of plotly.py fig.add_scatter() returns the entire fig object and not the newly added trace as it did before. This makes it possible to easily chain method calls but it means that you will need to use something like fig.add_scatter(x=a, y=b, mode='markers', marker=dict(size=10, opacity=0.2)).data[-1] if you want to get just the newly added trace.
@ursus, That works for me with Plotly.py 4.0 in jupyter notebook and jupyterlab but I can’t get it to work in jupyterlab. Where are you running your code and which versions of jupyter/notebook/ipywidgets are you using?
@ursus, did you ever get jupyterlab to load properly? I ran into a similar issue recently and I noticed the below error in my browser console regarding duplicate plugins being registered.