Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdboom merged 6 commits intomatplotlib:v2.xfromtacaswell:fix_polar_facecolor
Feb 15, 2016
Merged

Conversation

tacaswell
Copy link
Member

Closes#5996

 - 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 conflictsThis adds a minor, but nasty, API wart in that there are now twopositional arguements to set the background color of the axes and APIwise we are locked into one positional arg.  However, if any non-Nonevalue is passed for `axisbg` a warning will be raised and this is the`__init__` on a private base class so should have reatively littleuser exposure.
_axisbg -> _facecolorFinishing the change from axisbg -> facecolor
@tacaswelltacaswell added this to the2.0 (style change major release) milestoneFeb 14, 2016
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 '
Copy link
Member

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(
Copy link
Member

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?

Copy link
MemberAuthor

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.

@tacaswell
Copy link
MemberAuthor

Also noticed that we do not even really need that private variable, so fully removed it.

@mdboom
Copy link
Member

👍 I think this may already be on master, though:5f1127c

@tacaswell
Copy link
MemberAuthor

well, drat.

@tacaswell
Copy link
MemberAuthor

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 theupdate method.

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
@tacaswell
Copy link
MemberAuthor

There is a sutble API difference betweenset_axis_bgcolor andset_facecolor, the later (used to) set the internalself._facecolor (self._axisbg) attribute which is whatcla() uses to restore the color.

When setting the facecolor stash the value so that future calls to `cla`will restore the facecolor to this value.
mdboom added a commit that referenced this pull requestFeb 15, 2016
@mdboommdboom merged commit47b70ea intomatplotlib:v2.xFeb 15, 2016
@tacaswelltacaswell deleted the fix_polar_facecolor branchMay 12, 2016 21:41
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v2.0.0
Development

Successfully merging this pull request may close these issues.

3 participants
@tacaswell@mdboom@efiring

[8]ページ先頭

©2009-2025 Movatter.jp