John Hunter wrote: > On Tue, Sep 30, 2008 at 5:07 PM, Jae-Joon Lee <[EMAIL PROTECTED]> wrote: > >> The problem is already well explained by Eric. And my solution is to >> interpret the legend.pad as a fraction of the textsize (pad=0.3 seems >> to work fine in my eyes). Note that this breaks the backward >> compatibility. I personally think the original behavior may have >> produced unsatisfactory results in most of the cases and keeping it as >> a default may not be a good idea. While I hope others come out with an >> elegant solution, I prefer to break the API in this case. > > How about using a new kwarg and raising an exception if the old one is > passed in, with the exception pointing to the new arg? I am a little > uncomfortable silently changing the meaning of the old arg.
Done, except that it just raises a warning, and still works with the old kwarg. The new kwarg is "borderpad"; it is used if pad==0, which is the new rc default. I set the default borderpad=0.5. There is still too much other positioning in legend that is based on axes units. I briefly tried to start changing others, again with additional kwargs, and things quickly fell apart. Legend needs considerable reworking to take full advantage of the transforms framework (and maybe other mpl improvements since the original legend) and to put all positioning kwargs and code in sensible units. It is amazing that the present code works as well as it does. The way to make a transition may be via a separate version for a while. There could be a single interface, with a kwarg to choose the version. Eric ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users