tight_layout only works for instances of Subplots. However, ax2, which
is created by calling twinx, is an instance of Axes, and is not
accounted by the tight_layout command.It may be possible to improve
the situation, I doubt it would be easy as the association between ax1
and ax2 is not very expli
Wed, 7 Dec 2011 20:29:22 +0100
Jérôme a écrit:
> Is there a way to automatically resize the axis and nicely center the whole
> set {axes + ticklabels + labels} in the figure ?
>
> One could use add_axes and play with the coordinates until he gets something
> nice, but it gets complicated to have
Hi again.
Wed, 7 Dec 2011 20:29:22 +0100
Jérôme a écrit:
> Is there a way to automatically resize the axis and nicely center the whole
> set {axes + ticklabels + labels} in the figure ?
[...]
> Or did I miss something ?
It seems I missed figure.tight_layout().
Sorry about that...
--
Jérôme
Hi all.
The position of an axes is fixed at creation, regardless of the what goes
outside the plot area. If the numbers on the y-axis are big enough (say, 7
digits) and a label is added, the label gets out of the figure.
Example :
-