|
From: Florian L. <mai...@xg...> - 2005-05-17 17:32:10
|
Hello, how does loc=0 (best) affects the placement of the legend? I can't really figure out any influence. There is space (on the upper left) where the legend could be placed without hiding any lines but it's still placed on the upper right. Thanks, Florian |
|
From: John H. <jdh...@ac...> - 2005-05-17 17:44:00
|
>>>>> "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
|
|
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 > |
|
From: Florian L. <mai...@xg...> - 2005-05-17 19:47:20
|
Am Dienstag, 17. Mai 2005 19:43 schrieb John Hunter: > >>>>> "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. It is correct. But the John Gill gave me a explanation of this behavior which is correct for my case. It is not a bug, just a lazy implementation of the feature and he is aware of that. Florian |
|
From: John G. <jn...@eu...> - 2005-05-18 10:35:18
|
I'll have a play to see if I can make this a bit smarter. John Florian Lindner wrote: > Am Dienstag, 17. Mai 2005 19:43 schrieb John Hunter: > > >>>>> "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. > > It is correct. > > But the John Gill gave me a explanation of this behavior which is > correct for > my case. It is not a bug, just a lazy implementation of the feature > and he is > aware of that. > > Florian > > > ------------------------------------------------------- > 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 > |