I'm sure the radio silence to your question is just due to holidays.

Thanks for looking into this.  I'd be happy to incorporate your patch 
when it is ready.

As for your question about plots that can include patches -- patches are 
virtually anything plotted that aren't lines or images.  This includes 
rectangles, polygons and ellipses, for instance.  See something like 
ellipse_demo.py for an example.  Patches are always drawn as rectangles 
in the legend.

Cheers,
Mike

Paul Novak wrote:
> Hello,
> 
> I have further investigated problems with legend() when numpoints = 1.
> The images show what happens when numpoints = 1 for a Line2D, such as
> when calling plot(), for a LineCollection, and for a
> RegularPolyCollection, such as when using scatter(). As can be seen in
> the figures, calling legend() with numpoints = 1 results in either an
> absence of a line or a misplacement of a symbol or colored region,
> creating an ugly legend.
> 
> I have made the three figures using the script included below,
> line_collection.py from the examples, and scatter_demo.py from the 
> examples.
> 
> I will send a second message that includes a patch that attempts to fix
> the problems with legend() when numpoints=1, and some figures showing
> the improvement in the legends.
> 
> Paul
> 
> ---
> #!/usr/bin/env python
> 
> import matplotlib
> matplotlib.use('GTKAgg')
> 
> from pylab import *
> 
> x = arange(0.0, 5.0)
> y = 2.0 * x
> 
> figure(1)
> plot(x, y, 'o', label='symbol')
> plot(x, y, 'k-', label='line')
> 
> leg=legend(loc='best',numpoints=1)
> 
> show()
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> 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

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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