| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- 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`
| 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 ' |
There was a problem hiding this comment.
maybe -> may be
Sorry, something went wrong.
| @@ -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?
Sorry, something went wrong.
There was a problem hiding this comment.
I think you are correct.
Sorry, something went wrong.
|
Also noticed that we do not even really need that private variable, so fully removed it. |
Sorry, something went wrong.
|
👍 I think this may already be on master, though: 5f1127c |
Sorry, something went wrong.
|
well, drat. |
Sorry, something went wrong.
|
This PR looks like it touches a bit more than #5501 does. This adds face_color as an explicit kwarg that the _BaseAxes.__init__ pulls off rather than letting it fall all the way through to the update method. I need to rip out half of the last commit. |
Sorry, something went wrong.
- the decorator takes care of the warning - fall back got get/set_facecolor instead of private internal state
|
There is a sutble API difference between set_axis_bgcolor and set_facecolor, the later (used to) set the internal self._facecolor (self._axisbg) attribute which is what cla() uses to restore the color. |
Sorry, something went wrong.
When setting the facecolor stash the value so that future calls to `cla` will restore the facecolor to this value.
| Back | FazBrowse Home | New Git URL |
Closes #5996