@@ -519,7 +519,7 @@ def __init__(self, fig, rect,
519
519
facecolor = axisbg
520
520
if facecolor is None :
521
521
facecolor = rcParams ['axes.facecolor' ]
522
- self ._axisbg = facecolor
522
+ self ._facecolor = facecolor
523
523
self ._frameon = frameon
524
524
self ._axisbelow = rcParams ['axes.axisbelow' ]
525
525
@@ -1058,7 +1058,7 @@ def cla(self):
1058
1058
# setting the edgecolor to None
1059
1059
self .patch = self .axesPatch = self ._gen_axes_patch ()
1060
1060
self .patch .set_figure (self .figure )
1061
- self .patch .set_facecolor (self ._axisbg )
1061
+ self .patch .set_facecolor (self ._facecolor )
1062
1062
self .patch .set_edgecolor ('None' )
1063
1063
self .patch .set_linewidth (0 )
1064
1064
self .patch .set_transform (self .transAxes )
@@ -2714,7 +2714,7 @@ def set_axis_on(self):
2714
2714
@cbook .deprecated ('2.0' , alternative = 'get_facecolor' )
2715
2715
def get_axis_bgcolor (self ):
2716
2716
"""Return the axis background color"""
2717
- return self ._axisbg
2717
+ return self ._facecolor
2718
2718
2719
2719
@cbook .deprecated ('2.0' , alternative = 'set_facecolor' )
2720
2720
def set_axis_bgcolor (self , color ):
@@ -2727,7 +2727,7 @@ def set_axis_bgcolor(self, color):
2727
2727
warnings .warn (
2728
2728
"set_axis_bgcolor is deprecated. Use set_facecolor instead." ,
2729
2729
cbook .mplDeprecation )
2730
- self ._axisbg = color
2730
+ self ._facecolor = color
2731
2731
self .patch .set_facecolor (color )
2732
2732
self .stale = True
2733
2733
# data limits, ticks, tick labels, and formatting
0 commit comments