2010/10/10 Alessio Civ <viandant...@gmail.com>:
>
>
> Please, can someone help me? I've been digging the documentation, but I
> can't find a way to do this.

¿Didn't you get my message on oct-5? I didn't send it to the list by mistake:

--%<----------------------------------------------------------------------------
Make your variables numpy arrays and slice them using values in z:

x = np.array([1, 2, 3, 4])
y = np.array([2, 3, 4, 5])
z = np.array([0, 1, 0, 1])

x0 = x[z == 0]
y0 = y[z == 1]
x1 = x[z == 0]
y1 = y[z == 1]

plt.scatter(x0, y0, c='b')
plt.scatter(x1, y1, c='r')

--%<------------------------------------------------------------------------

See the attached example, you can run it as a script or import it as a
module and use the function multi_scatter in your code.

Goyo

Attachment: multi_scatter.py
Description: Binary data

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to