Ted Drain wrote:
> I need to efficiently plot a set of x,y points where each point has a
> different color. I tried multiple calls to plot() with a single point each
> but that is way too slow. I switched to using scatter() and passing in a
> list of colors which works great. However, I'd really like to have the
> marker options from plot() (things like '+' and 'x') which don't work w/
> scatter.
>
> What's the easiest way to get the markers from plot() with the efficiency
> (and multi-colors) from scatter?
>
> Thanks,
> Ted
>
Hi Ted,
oh - you can use '+' and 'x' and many more markers with scatter. It's
unfortunately just not documented in the current release but is fixed in
the repository.
pylab.scatter(x,y, marker=(4,2))
gives a '+', and
pylab.scatter(x,y, marker=(4,2,math.pi/4.))
gives a 'x'. The logic is a follows:
marker(numside, type, angle)
numside is the number of edges, i.e. 4 for a plus or a cross.
type : 0 -> a filled symbol,
1 -> a star-like symbol,
2 -> a asterisk like symbol
angle: the symbol gets rotated by this angle
So in principle with this you can produce an endless number of different
markers... :-)
Manuel
--
---------------------------------------
Manuel Metz ............ [EMAIL PROTECTED]
Argelander Institut fuer Astronomie
Auf dem Huegel 71 (room 3.06)
D - 53121 Bonn
E-Mail: [EMAIL PROTECTED]
Web: www.astro.uni-bonn.de/~mmetz
Phone: (+49) 228 / 73-3660
Fax: (+49) 228 / 73-3672
---------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users