| 
      
      
      From: John G. <jn...@eu...> - 2005-05-17 19:42:44
      
     | 
| This might be a feature rather than a bug. The legend auto-placement code is a bit lazy -- due to the fact that I wrote it rather than JDH :) Anyway, it only tries to avoid the points that define a line, rather than the lines themselves. Much of the time that works well, but since it only takes two points to define a line you can end up with the lines crossing the legend. The good news is that if a line does cross the legend, and you can see a better position for the legend then it almost surely means that the line is straight throughout the region where it crosses the legend. Try using the pan/zoom buttons on your plot to move a point into the legend area and it should jump out of the way. Eg: try this little snippet -- use your pan/zoom skills to position one of the dots over the legend ;) from pylab import * plot(range(5), 'o-', label='oops') legend(loc=0) show() John John Hunter wrote: > >>>>> "Florian" == Florian Lindner <mai...@xg...> writes: > > Florian> Hello, how does loc=0 (best) affects the placement of the > Florian> legend? I can't really figure out any influence. There is > Florian> space (on the upper left) where the legend could be > Florian> placed without hiding any lines but it's still placed on > Florian> the upper right. > > If what you say is correct, then it is a bug. Please post a complete > example. > > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click > <http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click> > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |