Conversation
- change name of first kwarg (third arg) of `_AxesBase.__init__` from 'axisbg' -> 'facecolor'. - added 'axisbg' back at the end of the listed kwargs - add handling from axisbg / facecolor conflicts This adds a minor, but nasty, API wart in that there are now two positional arguements to set the background color of the axes and API wise we are locked into one positional arg. However, if any non-None value is passed for `axisbg` a warning will be raised and this is the `__init__` on a private base class so should have reatively little user exposure.
_axisbg -> _facecolor Finishing the change from axisbg -> facecolor
Use `facecolor` not `axisbg`
lib/matplotlib/axes/_base.py
Outdated
| else: | ||
| if axisbg is not None and facecolor is not None: | ||
| raise TypeError('Both axisbg and facecolor are not None. ' | ||
| 'These keywords are aliases, only one maybe ' |
lib/matplotlib/axes/_base.py
Outdated
| @@ -2722,7 +2727,7 @@ def set_axis_bgcolor(self, color): | |||
| warnings.warn( | |||
There was a problem hiding this comment.
Is this warning still needed, given the decorator?
There was a problem hiding this comment.
I think you are correct.
|
Also noticed that we do not even really need that private variable, so fully removed it. |
|
👍 I think this may already be on master, though: 5f1127c |
|
well, drat. |
|
This PR looks like it touches a bit more than #5501 does. This adds face_color as an explicit kwarg that the I need to rip out half of the last commit. |
- the decorator takes care of the warning - fall back got get/set_facecolor instead of private internal state
4f706ae to
9cf717f
Compare
|
There is a sutble API difference between |
When setting the facecolor stash the value so that future calls to `cla` will restore the facecolor to this value.
Closes #5996