-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix polar facecolor #6001
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
Fix polar facecolor #6001
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`
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe -> may be
@@ -2722,7 +2727,7 @@ def set_axis_bgcolor(self, color): | |||
warnings.warn( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this warning still needed, given the decorator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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