Repository navigation
Conversation
Optionally fetch rcParams again in clf, issue matplotlib#7434
| self.stale = True | ||
|
|
||
| def clear(self, keep_observers=False): | ||
| def clear(self, keep_observers=False, disable_rc_fetch=True): |
There was a problem hiding this comment.
This needs to also pass the kwarg to clf
| _reset_loc_form(last_ax.xaxis) | ||
|
|
||
| def clf(self, keep_observers=False): | ||
| def clf(self, keep_observers=False, disable_rc_fetch=True): |
There was a problem hiding this comment.
Despite my comments in #7434 , I think a non-inverted kwarg (ex reset_rcparams=False) would be easier to understand.
tacaswell
left a comment
There was a problem hiding this comment.
Thanks for working on this!
In addition to the two comments, this will need a test (so we don't break it in the future) and an entry in whats_new (so people know it exists so they can use it).
|
If you are feeling ambitious can you also convert the docsctrings to numpydoc (https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt) format? |
| raise ValueError('figure size must be finite not ' | ||
| '{}'.format(figsize)) | ||
| self.bbox_inches = Bbox.from_bounds(0, 0, *figsize) | ||
| self.figsize = figsize |
There was a problem hiding this comment.
Why do we need these lines? How did these used to be handled?
There was a problem hiding this comment.
Because these parameters have to be accessed by clf, outside the scope of init. Before, they were only used within that scope.
fixed error: accidentally overwrote fig.tight_layout
|
I suggest that all these new attributes should be private (prefix with |
new figure properties set to private, and set the properties to their new values
|
I've made changes to make sure that the figure properties are actually changed to the fetched rcparams in clf, and the new attributes that were made to do this are now marked as private. |
|
The unit test, what's new entry, docstring et cetera are in there. |
|
I took a look at rebasing this and there have been enough changes to the @NNiehof I'm loath to close PRs, however I think given how far out of sync with the main branch this has gotten I am going to close it 😞 . I apologize that this get lost in review (which is on me), I hope we will hear from you again in the future. |
|
I guess we can say this has lost its relevance at this point 😄 |
PR Summary
Optionally consult rcParams again in clf, issue #7434
The parameters that
Figuregets from rcParams on creation are optionally fetched again inclfifreset_rcparamsis set to True. By default, this is set to False and thus disabled.PR Checklist