| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
This PR seems to restrict the subplot params into the the range [0,1]. This not useful. I don't like figure.subplot, because it sound so general... like "Hell yes, I want a subplot, so let's set it to True". But I suppose it's the natural name, given the current params. |
Sorry, something went wrong.
|
I just copied the name from figure.subplot.foo, don't really like it either, happy to change it for something better. |
Sorry, something went wrong.
|
Uh, so maybe that validator should change. I agree that it doesn't make sense to be able to set values larger 1 only via the api but not via rc. Resons to keep it as it is:
The latter are mainly workarounds, but as long as such problems do not have a good solution (and there will always such special cases I figure) it would be a pitty to artificially limit the available options to solve them quickly. |
Sorry, something went wrong.
|
Oh I see, the validators for hspace and wspace were just completely wrong too... killed them as well. |
Sorry, something went wrong.
The idea is to make it easier to restore a figure's subplotparams to the
rc-provided defaults. Specifically, this can now be done with
fig.subplots_adjust(**rcParams["figure.subplot"])
or
fig.subplots_adjust(**dict(rcParams["figure.subplot"], left=...))
if some values need to be overridden.
Also make Figure.clf() restore the subplotsparams to these rc-provided
defaults (that is the original motivation for the change).
Note that this PR runs into a limitation of the rcParams API: it would
be nicer if the validators took the rcParams as parameters (e.g.
implicitly by being methods of the RcParams class), so that they can
actually depend on another key in the same instance.
|
Since this Pull Request has not been updated in 60 days, it has been marked "inactive." This does not mean that it will be closed, though it may be moved to a "Draft" state. This helps maintainers prioritize their reviewing efforts. You can pick the PR back up anytime - please ping us if you need a review or guidance to move the PR forward! If you do not plan on continuing the work, please let us know so that we can either find someone to take the PR over, or close it. |
Sorry, something went wrong.
|
Just for tracking purposes, the surrounding machinery has mostly all been pr'd separately; the only question remaining is whether we want to group the rcparams into a single dict or not. (I still think this would be a good idea -- probably easiest would be to just start a new pr from scratch.) |
Sorry, something went wrong.
I think we should not do this right now. While a single dict would make some things easier, other things get hader. You'll have to write rcParams["figure.subplot"]["wspace"] instead of rcParams["figure.subplot.wspace"], which is more cumbersome and an API change. The dict-base rcParams is not suited to make the transition easy and it also lacks features to support all use cases well. I suggest to defer this to the redesign of the config system #24585. In particular. we can build a proper hierarchial interface there, which supports both rcParams["figure.subplot.wspace"] and config["figure.subplot"]. With a bit of careful design, the latter could be a dict or dict-like. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The idea is to make it easier to restore a figure's subplotparams to the
rc-provided defaults. Specifically, this can now be done with
or
if some values need to be overridden.
Also make Figure.clf() restore the subplotsparams to these rc-provided
defaults (that is the original motivation for the change).
Note that this PR runs into a limitation of the rcParams API: it would
be nicer if the validators took the rcParams as parameters (e.g.
implicitly by being methods of the RcParams class), so that they can
actually depend on another key in the same instance.
Also, the tests now restore original rcParams using dict.update to
avoid revalidating them and running into the warnings.
(rc_context.__exit__ does the same.)
Alternative to #11086.
PR Summary
PR Checklist