Hi, I'm trying to get matplotlib to give me a plot where the legend is outside the axes.
I saw several posts about this in the mailing list archives, but none of them really seem to provide workable solutions. Using Figure.legend() doesn't really put the legend outside the figure, because it doesn't resize the axes, so the legend just overlaps the figure. In the spirit of open source, I thought I'd try to do it myself. But I can't even figure out how the various matplotlib objects are being positioned in the window. Like, I can get some info about the axes with axes.get_position(), and I can get some info about the legend with legend.get_window_extent().get_bounds(), but the former is just proportional size information relative to the figure as a whole, and the second is in some coordinates I don't know how to interpret. How can I get information about the bounding boxes of the actual plot (i.e., the axes and plot area including ticks and labels) and the legend, in compatible numbers that will allow me to determine whether they overlap? Or, alternatively, is there some easier way to get legends to NEVER overlap lines? I'm rather surprised that there seems to be no way to guarantee this, since it seems like an obvious thing to want, and also since there seem to be a bunch of requests for it on the mailing list. Thanks for the help. -- --Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users