8000 Allow separate config of minor grid params in matplotlibrc. by RJTK · Pull Request #26121 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Allow separate config of minor grid params in matplotlibrc. #26121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RJTK
Copy link
@RJTK RJTK commented Jun 14, 2023

PR summary

Adds grid.minor.* params to matplotlibrc allowing one to set different parameters for minor grids. I've been manually turning on minor ticks with .grid(which="minor"), but this gets tiring and I'd like to be able to just enable this globally in the matplotlibrc file. However, both the major and minor parameters are c 8000 urrently configured with grid.*, with no distinction for minor or major. The present PR attempts to address this.

I can add examples / test / docs etc. if this might be an acceptable change.

PR checklist

Copy link
@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

@RJTK
Copy link
Author
RJTK commented Aug 5, 2023

Is there interest in this?

@jklymak
Copy link
Member
jklymak commented Aug 5, 2023

It seems ok but is a breaking change for any style that customized the grid style and expected the minor grid to change as well?

@QuLogic
Copy link
Member
QuLogic commented Aug 5, 2023

Yes, the grid.minor.* rcParams should probably default to something (name to be determined) that indicates it should fall back to the original major grid's grid.* rcParams version.

@QuLogic
Copy link
Member
QuLogic commented Aug 5, 2023

cc @timhoffm on that.

@RJTK
Copy link
Author
RJTK commented Aug 6, 2023

Yes, the grid.minor.* rcParams should probably default to something (name to be determined) that indicates it should fall back to the original major grid's grid.* rcParams version.

Agreed, I can update to ignore the .minor.* param unless explicitly set.

@timhoffm
Copy link
Member
timhoffm commented Aug 7, 2023

I think the pragmatic approach here is do use "inherit" as a default value and if that is encountered, use the respective non-minor grid value.

This also rhymes with the layering hierarchy that (major) is under grid.* and minor is one level below under grid.minor.*.

A revised config framework may add reusing other values within the config classes as well, but for now, the pragmatic solution is to hard-code that inheritance at the usage sites of grid.minor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for author
Development

Successfully merging this pull request may close these issues.

5 participants
0