I am plotting data with matplotlib, I have obtained a scatter plot from two numpy arrays:
ax1.scatter(p_100,tgw_e100,color='m',s=10,label="time 0")
I would like to add information about the eccentricity of each point.
For this purpose I have a third array of the same length of p_100
and tgw_e100
, ecc_100
whose items range from 0 to 1.
So I would like to set the transparency of my points using data from ecc_100
creating some sort of shade scale.
I have tried this:
ax1.scatter(p_100,tgw_e100,color='m',alpha = ecc_100,s=10,label="time 0")
But I got this error:
ValueError: setting an array element with a sequence.