-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
consult rcParams for Figures on fig.clf
#7434
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
Yes, the rcparams are locked in when the objects are created, thus changing the rcparams / style only affects newly created objects. This is a feature so that style context managers work. |
Then it seems that clf() is not performing quite as much work as I thought. Would it be possible to modify subplots_adjust() to take no arguments and simply update to the current set of rcParams? That way, changing the margins inside a context manager would work as long as you add the subplots_adjust() function call (and if the rcParams margins are the same as the figure margins it would act as a noop). |
So the current behavior of It might be reasonable to reset the subplots params to the rcvalues in We should add a flag to Milestoned as 2.1 as this would be (in my view) a new feature, but if it gets done it would not be hard to convince me it should be back ported to 2.0. The exact work here is:
I think most of the effort will be tracking down all of the rcParams used. |
fig.clf
I like this plan. |
Optionally fetch rcParams again in clf, issue matplotlib#7434
Hello, I'm interested in contributing to matplotlib, and this seemed like a good way to start! I've made the requested changes (see #9622). I'd like to ask for a few hints if that's alright. When I try to recompile matplotlib with my changes, the newly installed version doesn't seem to have my changes. I'm working in a conda environment (in Windows 7), from which I've removed matplotlib. Then installed it again with |
Hi @NNiehof. I use pip as described in the developer guide in the docs. You’ll also find very helpful instructions for how to use git and style guides etc. Good luck! |
@jklymak Thanks, I'll give that another go. I spent most of my Saturday getting matplotlib to install from source, the pip method didn't work then, because the dependencies and virtual environment weren't set up properly yet. Maybe now that's sorted out, building with pip as in the docs will work. |
I didn't know that, thank you! I'll direct further questions there.
Op 31 okt. 2017 20:17 schreef "Adrien F. Vincent" <notifications@github.com
…:
@NNiehof <https://github.com/nniehof> Just in case you don't already know
that is exist: if you are struggling on a technical point, the Matplotlib
gitter <https://gitter.im/matplotlib/matplotlib> channel is (sometimes)
more reactive that the issue tracker. Hopefully you won't need it ;).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7434 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQCs6Rlmo4zbx5sDZBy5uMJWumxhof-fks5sx3I8gaJpZM4KtktX>
.
|
There is a slightly bigger discussion going on over what |
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! |
version: 2.0.0b1+1773.g3590ce2
installed from src, OSX, gtk backend
if I have in rcParams:
figure.subplot.top=0.9
and I do:
then, the top margin is respected, but if I already have a window with figure already open and I do
then then top margin is not altered from 0.9 (like I might expect when changing the style).
I have to close the window and create a new one for this style change to have an effect. This is not expected behavior.
The text was updated successfully, but these errors were encountered: