@@ -145,9 +145,12 @@ def __init__(
145
145
zorder = mlines .Line2D .zorder
146
146
self ._zorder = zorder
147
147
148
- grid_color = mpl ._val_or_rc (grid_color , "grid.color" )
149
- grid_linestyle = mpl ._val_or_rc (grid_linestyle , "grid.linestyle" )
150
- grid_linewidth = mpl ._val_or_rc (grid_linewidth , "grid.linewidth" )
148
+ if grid_color is None :
149
+ grid_color = mpl .rcParams ["grid.color" ]
150
+ if grid_linestyle is None :
151
+ grid_linestyle = mpl .rcParams ["grid.linestyle" ]
152
+ if grid_linewidth is None :
153
+ grid_linewidth = mpl .rcParams ["grid.linewidth" ]
151
154
if grid_alpha is None and not mcolors ._has_alpha_channel (grid_color ):
152
155
# alpha precedence: kwarg > color alpha > rcParams['grid.alpha']
153
156
# Note: only resolve to rcParams if the color does not have alpha
@@ -772,7 +775,6 @@ def set_label_coords(self, x, y, transform=None):
772
775
self .stale = True
773
776
774
777
def get_transform (self ):
775
- """Return the transform used in the Axis' scale"""
776
778
return self ._scale .get_transform ()
777
779
778
780
def get_scale (self ):
@@ -1239,13 +1241,11 @@ def _set_lim(self, v0, v1, *, emit=True, auto):
1239
1241
self .axes .callbacks .process (f"{ name } lim_changed" , self .axes )
1240
1242
# Call all of the other axes that are shared with this one
1241
1243
for other in self ._get_shared_axes ():
1242
- if other is self .axes :
1243
- continue
1244
- other ._axis_map [name ]._set_lim (v0 , v1 , emit = False , auto = auto )
1245
- if emit :
1246
- other .callbacks .process (f"{ name } lim_changed" , other )
1247
- if other .figure != self .figure :
1248
- other .figure .canvas .draw_idle ()
1244
+ if other is not self .axes :
1245
+ other ._axis_map [name ]._set_lim (
1246
+ v0 , v1 , emit = False , auto = auto )
1247
+ if other .figure != self .figure :
1248
+ other .figure .canvas .draw_idle ()
1249
1249
1250
1250
self .stale = True
1251
1251
return v0 , v1
@@ -1966,6 +1966,7 @@ def set_ticklabels(self, labels, *, minor=False, fontdict=None, **kwargs):
1966
1966
raise TypeError (f"{ labels := } must be a sequence" ) from None
1967
1967
locator = (self .get_minor_locator () if minor
1968
1968
else self .get_major_locator ())
1969
+
1969
1970
if not labels :
1970
1971
# eg labels=[]:
1971
1972
formatter = mticker .NullFormatter ()
0 commit comments