Color scatter plot by third axis

Hello,

I would like to display point on X,Y coordinates then color then considering a third value contain in Z column.

For example :

import colorlover as cl
import numpy as np

col = cl.scales[‘10’][‘div’][‘RdYlGn’]
X = np.random.random_sample(10)
Y = np.random.random_sample(10)
Z = np.random.random_sample(10)

scatter = go.Scatter(x=X, y=Y, marker=dict(color=col))

Thanks for your help !

Find it ! :slight_smile:

scatter = go.Scatter(x=X, y=Y, marker=dict(color=Z, colorscale=‘Hot’))

1 Like