@@ -3669,47 +3669,7 @@ def set_xlim(self, left=None, right=None, emit=True, auto=False,
36693669 return self .xaxis ._set_lim (left , right , emit = emit , auto = auto )
36703670
36713671 get_xscale = _axis_method_wrapper ("xaxis" , "get_scale" )
3672-
3673- def set_xscale (self , value , ** kwargs ):
3674- """
3675- Set the x-axis scale.
3676-
3677- Parameters
3678- ----------
3679- value : {"linear", "log", "symlog", "logit", ...} or `.ScaleBase`
3680- The axis scale type to apply.
3681-
3682- **kwargs
3683- Different keyword arguments are accepted, depending on the scale.
3684- See the respective class keyword arguments:
3685-
3686- - `matplotlib.scale.LinearScale`
3687- - `matplotlib.scale.LogScale`
3688- - `matplotlib.scale.SymmetricalLogScale`
3689- - `matplotlib.scale.LogitScale`
3690- - `matplotlib.scale.FuncScale`
3691-
3692- Notes
3693- -----
3694- By default, Matplotlib supports the above mentioned scales.
3695- Additionally, custom scales may be registered using
3696- `matplotlib.scale.register_scale`. These scales can then also
3697- be used here.
3698- """
3699- old_default_lims = (self .xaxis .get_major_locator ()
3700- .nonsingular (- np .inf , np .inf ))
3701- g = self .get_shared_x_axes ()
3702- for ax in g .get_siblings (self ):
3703- ax .xaxis ._set_scale (value , ** kwargs )
3704- ax ._update_transScale ()
3705- ax .stale = True
3706- new_default_lims = (self .xaxis .get_major_locator ()
3707- .nonsingular (- np .inf , np .inf ))
3708- if old_default_lims != new_default_lims :
3709- # Force autoscaling now, to take advantage of the scale locator's
3710- # nonsingular() before it possibly gets swapped out by the user.
3711- self .autoscale_view (scaley = False )
3712-
3672+ set_xscale = _axis_method_wrapper ("xaxis" , "_set_axes_scale" )
37133673 get_xticks = _axis_method_wrapper ("xaxis" , "get_ticklocs" )
37143674 set_xticks = _axis_method_wrapper ("xaxis" , "set_ticks" )
37153675 get_xmajorticklabels = _axis_method_wrapper ("xaxis" , "get_majorticklabels" )
@@ -3941,47 +3901,7 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False,
39413901 return self .yaxis ._set_lim (bottom , top , emit = emit , auto = auto )
39423902
39433903 get_yscale = _axis_method_wrapper ("yaxis" , "get_scale" )
3944-
3945- def set_yscale (self , value , ** kwargs ):
3946- """
3947- Set the y-axis scale.
3948-
3949- Parameters
3950- ----------
3951- value : {"linear", "log", "symlog", "logit", ...} or `.ScaleBase`
3952- The axis scale type to apply.
3953-
3954- **kwargs
3955- Different keyword arguments are accepted, depending on the scale.
3956- See the respective class keyword arguments:
3957-
3958- - `matplotlib.scale.LinearScale`
3959- - `matplotlib.scale.LogScale`
3960- - `matplotlib.scale.SymmetricalLogScale`
3961- - `matplotlib.scale.LogitScale`
3962- - `matplotlib.scale.FuncScale`
3963-
3964- Notes
3965- -----
3966- By default, Matplotlib supports the above mentioned scales.
3967- Additionally, custom scales may be registered using
3968- `matplotlib.scale.register_scale`. These scales can then also
3969- be used here.
3970- """
3971- old_default_lims = (self .yaxis .get_major_locator ()
3972- .nonsingular (- np .inf , np .inf ))
3973- g = self .get_shared_y_axes ()
3974- for ax in g .get_siblings (self ):
3975- ax .yaxis ._set_scale (value , ** kwargs )
3976- ax ._update_transScale ()
3977- ax .stale = True
3978- new_default_lims = (self .yaxis .get_major_locator ()
3979- .nonsingular (- np .inf , np .inf ))
3980- if old_default_lims != new_default_lims :
3981- # Force autoscaling now, to take advantage of the scale locator's
3982- # nonsingular() before it possibly gets swapped out by the user.
3983- self .autoscale_view (scalex = False )
3984-
3904+ set_yscale = _axis_method_wrapper ("yaxis" , "_set_axes_scale" )
39853905 get_yticks = _axis_method_wrapper ("yaxis" , "get_ticklocs" )
39863906 set_yticks = _axis_method_wrapper ("yaxis" , "set_ticks" )
39873907 get_ymajorticklabels = _axis_method_wrapper ("yaxis" , "get_majorticklabels" )
0 commit comments