@@ -991,7 +991,8 @@ def cla(self):
991991 self .xaxis .major = self ._sharex .xaxis .major
992992 self .xaxis .minor = self ._sharex .xaxis .minor
993993 x0 , x1 = self ._sharex .get_xlim ()
994- self .set_xlim (x0 , x1 , emit = False , auto = None )
994+ self .set_xlim (x0 , x1 , emit = False ,
995+ auto = self ._sharex .get_autoscalex_on ())
995996 self .xaxis ._scale = mscale .scale_factory (
996997 self ._sharex .xaxis .get_scale (), self .xaxis )
997998 else :
@@ -1005,7 +1006,8 @@ def cla(self):
10051006 self .yaxis .major = self ._sharey .yaxis .major
10061007 self .yaxis .minor = self ._sharey .yaxis .minor
10071008 y0 , y1 = self ._sharey .get_ylim ()
1008- self .set_ylim (y0 , y1 , emit = False , auto = None )
1009+ self .set_ylim (y0 , y1 , emit = False ,
1010+ auto = self ._sharey .get_autoscaley_on ())
10091011 self .yaxis ._scale = mscale .scale_factory (
10101012 self ._sharey .yaxis .get_scale (), self .yaxis )
10111013 else :
@@ -1021,8 +1023,10 @@ def cla(self):
10211023 if (rcParams ['ytick.minor.visible' ]):
10221024 self .yaxis .set_minor_locator (mticker .AutoMinorLocator ())
10231025
1024- self ._autoscaleXon = True
1025- self ._autoscaleYon = True
1026+ if self ._sharex is None :
1027+ self ._autoscaleXon = True
1028+ if self ._sharey is None :
1029+ self ._autoscaleYon = True
10261030 self ._xmargin = rcParams ['axes.xmargin' ]
10271031 self ._ymargin = rcParams ['axes.ymargin' ]
10281032 self ._tight = None
0 commit comments