I was just looking for exactly this feature. I already did it programmatically before, but as I have a large number of different plots with major and minor gridlines, this is quite inconvenient.
Looking forward such an option in rcParams!
Reacted by Katerina, Brian Blaylock, Dan Hallatt, asarmy, Ahmad Omira, Jamie Mackenzie and Carlos Martin
I'm surprised that the settings are not automatically mirrored in the style sheet & rcParams. In fact, I would have thought that all of the defaults would be set up in rcParams & that would drive everything else.
Reacted by snuppets, Christian Knittl-Frank, Dan Hallatt, ompaiano and Carlos Martin
Bumping this issue -- I've found it unwieldy to copy and paste the same code snippet to get a fixed style that I almost always want, and would also appreciate support for differently styled major and minor gridlines via rc params.
Reacted by Dan Hallatt, asarmy, PhilipYip1988, Ahmad Omira, Jamie Mackenzie, Carlos Martin and ompaiano
Sorry but above answer isn't satisfactory IMHO. That is not what we are asking. Also, it forces ax.xaxis.set_minor_locator(MultipleLocator(0.5)), which I would not want in general.
This is a straightforward request and not hard to implement. It's from 2019 for crying out loud.
One other thing that I think is related, is the inability to specify tick label font in rcParams. I am able to specify the overall general font as Helvetica for example, successfully changing the font of everything in my generated plots, however this does not change the font of the tick labels (they remain in a serif font..)! I thought I could specify this in the rcParams (with something like font..ticklabel.family: sans-serif, font.ticklabel.serif: Helvetica), but it turns out this is another limitation that must be done programmatically... making each of my plots even more cumbersome and repetitive to code.
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 is suited to new contributors because it does not require understanding of the
Matplotlib internals. To get started, please see our contributing
guide.
We do not assign issues. Check the Development section in the sidebar for linked pull
requests (PRs). If there are none, feel free to start working on it. If there is an open PR, please
collaborate on the work by reviewing it rather than duplicating it in a competing PR.
As a word of warning: This is not as trivial as it sounds. We want to maintain backward-compatibility, i.e. if somebody changes th grid.* parameters, they should still affect both grids - unless of course they specify grid.minor.* explicitly. This possibly needs some hierachial lookup/dependency between the keys, which is not a concept we have in rcParams so far.
Activity
timhoffm commented on Apr 14, 2019
There are no separate parameters for major/minor grid properties in rcParams.
You can currently only configure them programmatically.
zertrin commented on Apr 15, 2019
I was just looking for exactly this feature. I already did it programmatically before, but as I have a large number of different plots with major and minor gridlines, this is quite inconvenient.
Looking forward such an option in rcParams!
dgua commented on Apr 8, 2020
Yes, PLEASE. I'm with @NGJROMO.
The programmatic way shown above is too cumbersome (and, is there a way to also set line width, color, and alpha?).
This is back to one year ago. Is there any way it can be implemented soon?
Here is what I want:

Thanks.
hjstein commented on Apr 21, 2020
I'm surprised that the settings are not automatically mirrored in the style sheet & rcParams. In fact, I would have thought that all of the defaults would be set up in rcParams & that would drive everything else.
neutrinonerd3333 commented on Nov 23, 2021
Bumping this issue -- I've found it unwieldy to copy and paste the same code snippet to get a fixed style that I almost always want, and would also appreciate support for differently styled major and minor gridlines via rc params.
jklymak commented on Nov 23, 2021
A motivated user could always write a PR for this. https://matplotlib.org/stable/devel/contributing.html However, be aware that new rcparams face a relatively high bar for acceptance.
One can also write their own styling wrapper if they are always doing this.
dgua commented on Nov 23, 2021
Sorry but above answer isn't satisfactory IMHO. That is not what we are asking. Also, it forces ax.xaxis.set_minor_locator(MultipleLocator(0.5)), which I would not want in general.
This is a straightforward request and not hard to implement. It's from 2019 for crying out loud.
jklymak commented on Nov 23, 2021
Matplotlib is a volunteer organization and PRs are always welcome!
DanHallatt commented on Feb 5, 2022
I agree with @neutrinonerd3333, and am in the same boat as him and @zertrin.
One other thing that I think is related, is the inability to specify tick label font in rcParams. I am able to specify the overall general font as Helvetica for example, successfully changing the font of everything in my generated plots, however this does not change the font of the tick labels (they remain in a serif font..)! I thought I could specify this in the rcParams (with something like font..ticklabel.family: sans-serif, font.ticklabel.serif: Helvetica), but it turns out this is another limitation that must be done programmatically... making each of my plots even more cumbersome and repetitive to code.
github-actions commented on Jun 12, 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!
timhoffm commented on Jun 12, 2023
This is a highly requested feature. -> keep
YamenMejri commented on Dec 16, 2023
any updates on this?
nNeD5 commented on Apr 17, 2024
Still need this feature
github-actions commented on Apr 17, 2024
Good first issue - notes for new contributors
This issue is suited to new contributors because it does not require understanding of the
Matplotlib internals. To get started, please see our contributing
guide.
We do not assign issues. Check the Development section in the sidebar for linked pull
requests (PRs). If there are none, feel free to start working on it. If there is an open PR, please
collaborate on the work by reviewing it rather than duplicating it in a competing PR.
If something is unclear, please reach out on any of our communication
channels.
jklymak commented on Apr 17, 2024
Maybe some extra tagging will help, but someone who wants this feature needs to propose a PR for it to get implemented.
timhoffm commented on Apr 19, 2024
As a word of warning: This is not as trivial as it sounds. We want to maintain backward-compatibility, i.e. if somebody changes th grid.* parameters, they should still affect both grids - unless of course they specify grid.minor.* explicitly. This possibly needs some hierachial lookup/dependency between the keys, which is not a concept we have in rcParams so far.
Possible fix for issue matplotlib#13919
Support individual styling of major and minor grid through rcParams (#…
carlosgmartin commented on Nov 15, 2025
@QuLogic @timhoffm The new options, like grid.major.color, don't show up in "The default matplotlibrc file" in the docs. Is this expected?
timhoffm commented on Nov 15, 2025
@carlosgmartin As you can see from the milestone assignment, this will be released in 3.11. The stable docs are currently 3.10.7. You can find the dev version of the docs at https://matplotlib.org/devdocs/users/explain/customizing.html