@@ -3681,47 +3681,7 @@ def set_xlim(self, left=None, right=None, emit=True, auto=False,
3681
3681
return self .xaxis ._set_lim (left , right , emit = emit , auto = auto )
3682
3682
3683
3683
get_xscale = _axis_method_wrapper ("xaxis" , "get_scale" )
3684
-
3685
- def set_xscale (self , value , ** kwargs ):
3686
- """
3687
- Set the x-axis scale.
3688
-
3689
- Parameters
3690
- ----------
3691
- value : {"linear", "log", "symlog", "logit", ...} or `.ScaleBase`
3692
- The axis scale type to apply.
3693
-
3694
- **kwargs
3695
- Different keyword arguments are accepted, depending on the scale.
3696
- See the respective class keyword arguments:
3697
-
3698
- - `matplotlib.scale.LinearScale`
3699
- - `matplotlib.scale.LogScale`
3700
- - `matplotlib.scale.SymmetricalLogScale`
3701
- - `matplotlib.scale.LogitScale`
3702
- - `matplotlib.scale.FuncScale`
3703
-
3704
- Notes
3705
- -----
3706
- By default, Matplotlib supports the above mentioned scales.
3707
- Additionally, custom scales may be registered using
3708
- `matplotlib.scale.register_scale`. These scales can then also
3709
- be used here.
3710
- """
3711
- old_default_lims = (self .xaxis .get_major_locator ()
3712
- .nonsingular (- np .inf , np .inf ))
3713
- g = self .get_shared_x_axes ()
3714
- for ax in g .get_siblings (self ):
3715
- ax .xaxis ._set_scale (value , ** kwargs )
3716
- ax ._update_transScale ()
3717
- ax .stale = True
3718
- new_default_lims = (self .xaxis .get_major_locator ()
3719
- .nonsingular (- np .inf , np .inf ))
3720
- if old_default_lims != new_default_lims :
3721
- # Force autoscaling now, to take advantage of the scale locator's
3722
- # nonsingular() before it possibly gets swapped out by the user.
3723
- self .autoscale_view (scaley = False )
3724
-
3684
+ set_xscale = _axis_method_wrapper ("xaxis" , "_set_axes_scale" )
3725
3685
get_xticks = _axis_method_wrapper ("xaxis" , "get_ticklocs" )
3726
3686
set_xticks = _axis_method_wrapper ("xaxis" , "set_ticks" )
3727
3687
get_xmajorticklabels = _axis_method_wrapper ("xaxis" , "get_majorticklabels" )
@@ -3953,47 +3913,7 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False,
3953
3913
return self .yaxis ._set_lim (bottom , top , emit = emit , auto = auto )
3954
3914
3955
3915
get_yscale = _axis_method_wrapper ("yaxis" , "get_scale" )
3956
-
3957
- def set_yscale (self , value , ** kwargs ):
3958
- """
3959
- Set the y-axis scale.
3960
-
3961
- Parameters
3962
- ----------
3963
- value : {"linear", "log", "symlog", "logit", ...} or `.ScaleBase`
3964
- The axis scale type to apply.
3965
-
3966
- **kwargs
3967
- Different keyword arguments are accepted, depending on the scale.
3968
- See the respective class keyword arguments:
3969
-
3970
- - `matplotlib.scale.LinearScale`
3971
- - `matplotlib.scale.LogScale`
3972
- - `matplotlib.scale.SymmetricalLogScale`
3973
- - `matplotlib.scale.LogitScale`
3974
- - `matplotlib.scale.FuncScale`
3975
-
3976
- Notes
3977
- -----
3978
- By default, Matplotlib supports the above mentioned scales.
3979
- Additionally, custom scales may be registered using
3980
- `matplotlib.scale.register_scale`. These scales can then also
3981
- be used here.
3982
- """
3983
- old_default_lims = (self .yaxis .get_major_locator ()
3984
- .nonsingular (- np .inf , np .inf ))
3985
- g = self .get_shared_y_axes ()
3986
- for ax in g .get_siblings (self ):
3987
- ax .yaxis ._set_scale (value , ** kwargs )
3988
- ax ._update_transScale ()
3989
- ax .stale = True
3990
- new_default_lims = (self .yaxis .get_major_locator ()
3991
- .nonsingular (- np .inf , np .inf ))
3992
- if old_default_lims != new_default_lims :
3993
- # Force autoscaling now, to take advantage of the scale locator's
3994
- # nonsingular() before it possibly gets swapped out by the user.
3995
- self .autoscale_view (scalex = False )
3996
-
3916
+ set_yscale = _axis_method_wrapper ("yaxis" , "_set_axes_scale" )
3997
3917
get_yticks = _axis_method_wrapper ("yaxis" , "get_ticklocs" )
3998
3918
set_yticks = _axis_method_wrapper ("yaxis" , "set_ticks" )
3999
3919
get_ymajorticklabels = _axis_method_wrapper ("yaxis" , "get_majorticklabels" )
0 commit comments