@@ -1015,7 +1015,8 @@ def cla(self):
10151015 self .xaxis .major = self ._sharex .xaxis .major
10161016 self .xaxis .minor = self ._sharex .xaxis .minor
10171017 x0 , x1 = self ._sharex .get_xlim ()
1018- self .set_xlim (x0 , x1 , emit = False , auto = None )
1018+ self .set_xlim (x0 , x1 , emit = False ,
1019+ auto = self ._sharex .get_autoscalex_on ())
10191020 self .xaxis ._scale = mscale .scale_factory (
10201021 self ._sharex .xaxis .get_scale (), self .xaxis )
10211022 else :
@@ -1029,7 +1030,8 @@ def cla(self):
10291030 self .yaxis .major = self ._sharey .yaxis .major
10301031 self .yaxis .minor = self ._sharey .yaxis .minor
10311032 y0 , y1 = self ._sharey .get_ylim ()
1032- self .set_ylim (y0 , y1 , emit = False , auto = None )
1033+ self .set_ylim (y0 , y1 , emit = False ,
1034+ auto = self ._sharey .get_autoscaley_on ())
10331035 self .yaxis ._scale = mscale .scale_factory (
10341036 self ._sharey .yaxis .get_scale (), self .yaxis )
10351037 else :
@@ -1045,8 +1047,10 @@ def cla(self):
10451047 if (rcParams ['ytick.minor.visible' ]):
10461048 self .yaxis .set_minor_locator (mticker .AutoMinorLocator ())
10471049
1048- self ._autoscaleXon = True
1049- self ._autoscaleYon = True
1050+ if self ._sharex is None :
1051+ self ._autoscaleXon = True
1052+ if self ._sharey is None :
1053+ self ._autoscaleYon = True
10501054 self ._xmargin = rcParams ['axes.xmargin' ]
10511055 self ._ymargin = rcParams ['axes.ymargin' ]
10521056 self ._tight = None
0 commit comments