| 
      
      
      From: Jae-Joon L. <lee...@gm...> - 2010-02-05 17:41:30
      
     | 
| On Fri, Feb 5, 2010 at 10:10 AM, Eymen Alyaz <ea...@mp...> wrote:
> Is there a way to automatically correct the area of figure and resize it
> such that every box drawn is visible?
>
Things like axes position is given in normalized figure coordinates,
thus while you can change the figure size but it is quite hard to keep
things in place. And, no, current mpl does not support that.
If you're only interested in the saved ouput, you may use
"bbox_inches" option of "savefig". It does not change the size of the
figure currently displayed, but it does change the size of the figure
that is to be saved. Unfortunately, the released version of mpl will
not work. With svn version, you can do
l = legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
savefig("a.eps", bbox_inches="tight", bbox_extra_artists=[l.legendPatch])
Regards,
-JJ
 |