Thanks!  I had originally just tried it (ignoring the docs) but my plot just
showed dots instead of markers for both 'x' and '+'.  Then I read the docs
which seemed to indicate they wouldn't work.

Late last night I was digging through axes.py and noticed that they should
be supported (and I found the scatter example that uses them).  My problem
was that the point scale input needed to be 3-4 times larger than the
default value for the marker to be visible.  Once I changed that, everything
worked fine.

Thanks for the doc patch - that will help everyone else in the future...

Ted

> -----Original Message-----
> From: Manuel Metz [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 20, 2008 1:13 AM
> To: Ted Drain
> Cc: matplotlib-users@lists.sourceforge.net
> Subject: Re: [Matplotlib-users] Efficient scatter() w/ markers from
> plot()?
> 
> 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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to