File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -852,7 +852,15 @@ def cla(self):
852852 self .xaxis .minor = self ._sharex .xaxis .minor
853853 x0 , x1 = self ._sharex .get_xlim ()
854854 self .set_xlim (x0 , x1 , emit = False , auto = None )
855+
856+ # Save the current formatter so we don't lose it
857+ frmt = self ._sharex .xaxis .get_major_formatter ()
858+
859+ # This overwrites the current formatter
855860 self .xaxis .set_scale (self ._sharex .xaxis .get_scale ())
861+
862+ # Reset the formatter
863+ self .xaxis .set_major_formatter (frmt )
856864 else :
857865 self .xaxis .set_scale ('linear' )
858866
@@ -861,7 +869,15 @@ def cla(self):
861869 self .yaxis .minor = self ._sharey .yaxis .minor
862870 y0 , y1 = self ._sharey .get_ylim ()
863871 self .set_ylim (y0 , y1 , emit = False , auto = None )
872+
873+ # Save the current formatter so we don't lose it
874+ frmt = self ._sharey .yaxis .get_major_formatter ()
875+
876+ # This overwrites the current formatter
864877 self .yaxis .set_scale (self ._sharey .yaxis .get_scale ())
878+
879+ # Reset the formatter
880+ self .yaxis .set_major_formatter (frmt )
865881 else :
866882 self .yaxis .set_scale ('linear' )
867883
You can’t perform that action at this time.
0 commit comments