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
{{ message }}
Repository navigation
axes.margins set left/right and top/bottom independently #1912
axes.margins should allow setting left and right margins and top and bottom margins independantly. I often increase the top and right margins only so as to give room for the legend which sometimes takes place.
Reacted by Elan Ernest, Mark Egge, Lucas Possatti, Alberto Spina, Jonathan Wischhusen, Yue JIN, Juan Luis Cano Rodríguez, Stas and Atanas K. Stefanov
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
I'm personally not a fan of the "good first issue" label, as it has recently attracted mainly low-quality contributions (some "good first issues" with >10 closed solution attempts). So I'm hesitant to use that label,
The topic itself is not too difficult I think. You should understand the autoscaling mechanism, and there's a bit of API discussion that we'd need to have together up-front. From the pure implementation side, this should be relatively straight forward. If you or somebody else has interest, please speak up and we'll figure out a way forward.
Hey Tim -- thanks for the fast response, and the pointer to the autoscale docs, which I will read...
I am very much interested, but have an administrative constraint that I supposed many folks here will empathize with: the need to placate a thesis committee with something presentable by the end of week, as opposed to a durable solution that will last for a good long while.
I'm leaving this thread open and would like to do this, but can't specify a timeline.
Apropos, the revolting hack I will use to eyeball myself a passable figure in the next half hour is something like:
Activity
mowa-lepota commentedon Jul 31, 2013
this would also be particularly useful when setting margins for logarithmic plots.
tacaswell commentedon Aug 2, 2013
I am starting to work on this.
It looks like the only major api break required is the no-argument return on
ax.margins()(and by extension onplt.margins().Everything else appears like it can be done in a backwards compatible way.
implemented support for asymmetric margins.
tacaswell commentedon Jan 21, 2014
flagged this as 1.4, but it might have to slide.
I am closing both of the PR's that try to address (#2263 and #2276) as neither seems to address this in the right way.
petehuang commentedon Dec 30, 2016
This is still unaddressed, I believe. The PRs pointing to this issue have good discussion, would recommend reading.
Recommend labeling as Difficulty: Medium perhaps?
heavytull commentedon Jan 3, 2017
it's been some time since i reported this wish / request, nearly three years and half later it is still an open issue!
AdrienLemaire commentedon Mar 8, 2017
was just looking for this, too bad it's not possible
7 remaining items
github-actions commentedon Dec 22, 2023
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
kingyue737 commentedon Jan 5, 2024
@github-actions
status:activegithub-actions commentedon Jan 6, 2025
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
boyanpenkov commentedon Jul 14, 2026
I suspect this might not be considered a good first issue (a la https://github.com/matplotlib/matplotlib/contribute), would it?
timhoffm commentedon Jul 14, 2026
I'm personally not a fan of the "good first issue" label, as it has recently attracted mainly low-quality contributions (some "good first issues" with >10 closed solution attempts). So I'm hesitant to use that label,
The topic itself is not too difficult I think. You should understand the autoscaling mechanism, and there's a bit of API discussion that we'd need to have together up-front. From the pure implementation side, this should be relatively straight forward. If you or somebody else has interest, please speak up and we'll figure out a way forward.
boyanpenkov commentedon Jul 14, 2026
Hey Tim -- thanks for the fast response, and the pointer to the autoscale docs, which I will read...
I am very much interested, but have an administrative constraint that I supposed many folks here will empathize with: the need to placate a thesis committee with something presentable by the end of week, as opposed to a durable solution that will last for a good long while.
I'm leaving this thread open and would like to do this, but can't specify a timeline.
Apropos, the revolting hack I will use to eyeball myself a passable figure in the next half hour is something like:
For context, this need stems from my repeated use of:
This then seems to leave too much whitespace on the top and right...
Cheers!