On Wed, Aug 8, 2012 at 3:34 PM, Gustavo Goretkin <gustavo.goret...@gmail.com
> wrote:
> I can use the scatter function to plot an array of points and give a
> corresponding array of colors to set those points. Is it possible to
> do the same thing with alpha values?
>
> Right now, I'm restoring to calling plot with an 'o' marker for each
> individual point, which is slow.
>
>
The 'color' argument of the 'scatter' function can take an array of
(r,g,b,alpha) values:
In [23]: x = array([0, 1, 2, 3])
In [24]: y = array([0, 1, 1, 2])
In [25]: c = array([[0,0,1,1], [0,0,1,0.5], [0,1,0,0.5], [1,0,1,.9]])
In [26]: scatter(x, y, color=c)
Out[26]: <matplotlib.collections.PathCollection at 0x898adf0>
Warren
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users