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
Currently, it is not possible to have the gridlines drawn below plotlines and simultaneously have ticks drawn above plotlines. With the set_axisbelow method, the gridlines and ticks are both set either above or below any plotlines. Here is a minimal working example:
In the example above, in the top subplot, the set_axisbelow(False) method makes the gridlines above the plotline; while in the bottom subplot, the set_axisbelow(True) method makes the plotline above the ticks. This is unfortunate because, in my typical use case, I never want the gridlines above the data and I never want the ticks below the data, so I have to "simulate" a fake grid by drawing individual lines with axvline and axhline. This missing functionality was noticed at stackoverflow http://stackoverflow.com/questions/19677963/matplotlib-keep-grid-lines-behind-the-graph-but-the-y-and-x-axis-above
a while ago, where it was called a "feature" by @tacaswell , so I am requesting a new functionality that would allow the gridlines to be set below all other artists without affecting the axis spines or ticks. Perhaps a new axes method named set_gridbelow would do the trick, or an optional kwarg to set_axisbelow.
In any case, I can't believe that I am the only person who wants this functionality to be built-in, so I hope that you consider adding this enhancement. Thanks.
The text was updated successfully, but these errors were encountered:
#6287 does not separate ticks and grids, so that does not directly address this, but it does mention that doing so would require significant refactoring. Worth considering to evaluate impact-effort tradeoff for this
tacaswell
modified the milestones:
2.2 (next next feature release),
2.1 (next point release)Jan 10, 2017
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!
Hi matplotlib developers,
Currently, it is not possible to have the gridlines drawn below plotlines and simultaneously have ticks drawn above plotlines. With the
set_axisbelow
method, the gridlines and ticks are both set either above or below any plotlines. Here is a minimal working example:In the example above, in the top subplot, the
set_axisbelow(False)
method makes the gridlines above the plotline; while in the bottom subplot, theset_axisbelow(True)
method makes the plotline above the ticks. This is unfortunate because, in my typical use case, I never want the gridlines above the data and I never want the ticks below the data, so I have to "simulate" a fake grid by drawing individual lines withaxvline
andaxhline
. This missing functionality was noticed at stackoverflowhttp://stackoverflow.com/questions/19677963/matplotlib-keep-grid-lines-behind-the-graph-but-the-y-and-x-axis-above
a while ago, where it was called a "feature" by @tacaswell , so I am requesting a new functionality that would allow the gridlines to be set below all other artists without affecting the axis spines or ticks. Perhaps a new axes method named
set_gridbelow
would do the trick, or an optional kwarg toset_axisbelow
.In any case, I can't believe that I am the only person who wants this functionality to be built-in, so I hope that you consider adding this enhancement. Thanks.
The text was updated successfully, but these errors were encountered: