On Mon, May 20, 2013 at 12:02 PM, Martin Mokrejs <
mmokr...@fold.natur.cuni.cz> wrote:

> Hi,
>   I am having trouble to get space allocated for a long legend text,
> lets say spanning 2/3 - 3/4 of the whole output. I would like to have
> stacked barchart as 1st subplot and the place of remaining 3 subplots
> to be actually allocated by the legend. Alternatively, could I get the
> legend saved into a separate figure?
>
> Or could the space for legend text be allocated automatically minimizing
> output figure size? For example, the width would be 1120px while height
> be multiples of 840px (840 for each subplot)?
>
>   Attached is a quick example. It shows also that I tried tight_layout()
> but wasn't successful with this either. I would be glad for some help,
> ideally converting the whole thing into an object-oriented approach.
> I am generating several figures in a row and would like to clear()/del()
> any previously used data ASAP.
>
>
> Thank you,
> Martin
> Am using mpl-1.2.2
>
>
Try "fig.savefig('foobar.png', bbox_inches='tight')" when saving the
image.  It will make the figure size such that all the visible elements of
the figure will fit into the saved output.  tight_layout() is meant to make
sure the elements don't overlap each other, but does nothing about making
sure nothing gets clipped.

Cheers!
Ben Root
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to