Skip to content

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

Merged
merged 6 commits into from
Feb 15, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
MNT: rename internal variable in _AxesBase
_axisbg -> _facecolor

Finishing the change from axisbg -> facecolor
  • Loading branch information
tacaswell committed Feb 14, 2016
commit c68af4afa85c57ce608c3e6531741b4c6b87a465
8 changes: 4 additions & 4 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def __init__(self, fig, rect,
facecolor = axisbg
if facecolor is None:
facecolor = rcParams['axes.facecolor']
self._axisbg = facecolor
self._facecolor = facecolor
self._frameon = frameon
self._axisbelow = rcParams['axes.axisbelow']

Expand Down Expand Up @@ -1058,7 +1058,7 @@ def cla(self):
# setting the edgecolor to None
self.patch = self.axesPatch = self._gen_axes_patch()
self.patch.set_figure(self.figure)
self.patch.set_facecolor(self._axisbg)
self.patch.set_facecolor(self._facecolor)
self.patch.set_edgecolor('None')
self.patch.set_linewidth(0)
self.patch.set_transform(self.transAxes)
Expand Down Expand Up @@ -2714,7 +2714,7 @@ def set_axis_on(self):
@cbook.deprecated('2.0', alternative='get_facecolor')
def get_axis_bgcolor(self):
"""Return the axis background color"""
return self._axisbg
return self._facecolor

@cbook.deprecated('2.0', alternative='set_facecolor')
def set_axis_bgcolor(self, color):
Expand All @@ -2727,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
Member Author

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.

"set_axis_bgcolor is deprecated. Use set_facecolor instead.",
cbook.mplDeprecation)
self._axisbg = color
self._facecolor = color
self.patch.set_facecolor(color)
self.stale = True
# data limits, ticks, tick labels, and formatting
Expand Down