You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tight_layout supports a rect option ("layout axes so that they fit within this rect instead of filling the entire figure"). It could be nice if constrained_layout also supported that.
As an example use case, requested by @jklymak on gitter:
This draws e.g. three different coordinates of three datasets, and tries to have a single one-line legend at the center top.
The first try gives
i.e. it would work if set_in_layout could be used to take the legend's y extent, but not its x extent (now that I think of it, that may be the better solution).
The second try gives
which is where I think a rect option would work to avoid the axes overlapping the legend (you'd have to tweak the value a bit manually, though, to specify the upper bound of the rect). (Perhaps not the nicest solution, but "could work when you just want to get a plot done".)
Proposed solution
No response
The text was updated successfully, but these errors were encountered:
Problem
tight_layout supports a rect option ("layout axes so that they fit within this rect instead of filling the entire figure"). It could be nice if constrained_layout also supported that.
As an example use case, requested by @jklymak on gitter:
This draws e.g. three different coordinates of three datasets, and tries to have a single one-line legend at the center top.
The first try gives


i.e. it would work if set_in_layout could be used to take the legend's y extent, but not its x extent (now that I think of it, that may be the better solution).
The second try gives
which is where I think a rect option would work to avoid the axes overlapping the legend (you'd have to tweak the value a bit manually, though, to specify the upper bound of the rect). (Perhaps not the nicest solution, but "could work when you just want to get a plot done".)
Proposed solution
No response
The text was updated successfully, but these errors were encountered: