-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: Add zorder
(grid, scatter, line, etc) in rcParams
#29699
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
Comments
Note: more generally, I have a list of other things I'd like to see in rcParams. |
@JosephBARBIERDARNAL one of the things we've been discussing on and off is what our rcparams spec should even be - should it migrate to Python or json or the like (a good proportion of https://matplotlib.org/devdocs/devel/MEP/index.html) So might be worth thinking of this from that broader picture given that as far as I can see, this proposal would entail adding zorder to a bunch of properties (lines.zorder, etc)/ |
@story645 Would such a PR be welcome in the current rcParams structure, or should I wait until the spec changes are more finalized? If it helps, from the user's point of view, rcParams is really intuitive and I don't know what other specifications would add. The only thing that I feel could be improved is the matplotlibrc file, which I've always found confusing. |
We have been relatively permissive about adding new rcparams when there has been a use case (we grow one or two per release). I suspect we would merge a PR adding the 4 listed zorder controls. |
Great! Any pointers on how to add something to rcParams would be much appreciated (a PR that does this might actually work, I'll try to find one). |
#18715 is a reasonable template. |
Perfect, thanks |
how? what kinda things would make it easier for you? |
The current zorder values are collected here: https://matplotlib.org/stable/gallery/misc/zorder_demo.html#zorder-demo. If we start making them configurable, we should do all
The majortick zorder is currently line.zorder + 0.01. We could leave that for a start, or also think about making it configureable. Same with grid.zorder. |
It's more than that I don't understand why users should even be aware of this file. When looking at this in the documentation, it suggests that we can modify values in it to customize a plot, but at the same time the top of the file is From what I understand, rcParams is the only thing that users should be worried about, both in terms of ease of use and reproductibility (since I assume the matplotlibrc file is not meant to be versioned). Maybe this documentation is meant for matplotlib developers, but it's not obvious. What I like about this page in the documentation is that it contains all the rcParams parameters clearly defined. |
The following lines state that users should make a copy of the file and edit that. Is there a way you think we could make that more obvious? |
I just realised I'd misread it, I thought it was But maybe something like that would be more intuitive: |
Wanna open that PR? |
Yes, here it is: #30037 |
Problem
Hi!
I'm working on rcParams and I'd really like it to be possible to control the default zorder of certain elements. The more the better, but being able to control the zorder specifically for grid, lines, scatter and bars would be great!
Is that possible?
Also, I'm willing to open a PR for this as long as it doesn't require a deep understanding of the inner workings of matplotlib.
Proposed solution
/
The text was updated successfully, but these errors were encountered: