@@ -2918,17 +2918,29 @@ def get_xscale(self):
2918
2918
get_xscale .__doc__ = "Return the xaxis scale string: %s" "" % (
2919
2919
", " .join (mscale .get_scale_names ()))
2920
2920
2921
- @docstring .dedent_interpd
2922
2921
def set_xscale (self , value , ** kwargs ):
2923
2922
"""
2924
2923
Set the x-axis scale
2925
2924
2926
- Set the scaling of the x-axis: %(scale)s
2925
+ Parameters
2926
+ ----------
2927
+ value : {"linear", "log", "symlog", "logit"}
2928
+ scaling strategy to apply
2927
2929
2928
- ACCEPTS: [%(scale)s]
2930
+ Notes
2931
+ -----
2932
+ Different kwargs are accepted, depending on the scale. See
2933
+ the `~matplotlib.scale` module for more information.
2929
2934
2930
- Different kwargs are accepted, depending on the scale:
2931
- %(scale_docs)s
2935
+ See also
2936
+ --------
2937
+ matplotlib.scale.LinearScale : linear transfrom
2938
+
2939
+ matplotlib.scale.LogTransform : log transform
2940
+
2941
+ matplotlib.scale.SymmetricalLogTransform : symlog transform
2942
+
2943
+ matplotlib.scale.LogisticTransform : logit transform
2932
2944
"""
2933
2945
# If the scale is being set to log, clip nonposx to prevent headaches
2934
2946
# around zero
@@ -2998,18 +3010,22 @@ def get_xticklabels(self, minor=False, which=None):
2998
3010
self .xaxis .get_ticklabels (minor = minor ,
2999
3011
which = which ))
3000
3012
3001
- @docstring .dedent_interpd
3002
3013
def set_xticklabels (self , labels , fontdict = None , minor = False , ** kwargs ):
3003
3014
"""
3004
- Set the xtick labels with list of strings * labels*
3015
+ Set the xtick labels with list of string labels
3005
3016
3006
- Return a list of axis text instances.
3017
+ Parameters
3018
+ ----------
3019
+ labels : list of str
3020
+ list of string labels
3007
3021
3008
- *kwargs* set the :class:`~matplotlib.text.Text` properties.
3009
- Valid properties are
3010
- %( Text)s
3022
+ Returns
3023
+ -------
3024
+ A list of `~matplotlib.text. Text` instances
3011
3025
3012
- ACCEPTS: sequence of strings
3026
+ Other Parameters
3027
+ -----------------
3028
+ **kwargs : `~matplotlib.text.Text` properties.
3013
3029
"""
3014
3030
if fontdict is not None :
3015
3031
kwargs .update (fontdict )
@@ -3139,7 +3155,6 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False, **kw):
3139
3155
0 m, is at the top.
3140
3156
3141
3157
>>> set_ylim(5000, 0)
3142
-
3143
3158
"""
3144
3159
if 'ymin' in kw :
3145
3160
bottom = kw .pop ('ymin' )
@@ -3199,16 +3214,29 @@ def get_yscale(self):
3199
3214
get_yscale .__doc__ = "Return the yaxis scale string: %s" "" % (
3200
3215
", " .join (mscale .get_scale_names ()))
3201
3216
3202
- @docstring .dedent_interpd
3203
3217
def set_yscale (self , value , ** kwargs ):
3204
- """Set the y-axis scale
3218
+ """
3219
+ Set the y-axis scale
3220
+
3221
+ Parameters
3222
+ ----------
3223
+ value : {"linear", "log", "symlog", "logit"}
3224
+ scaling strategy to apply
3225
+
3226
+ Notes
3227
+ -----
3228
+ Different kwargs are accepted, depending on the scale. See
3229
+ the `~matplotlib.scale` module for more information.
3230
+
3231
+ See also
3232
+ --------
3233
+ matplotlib.scale.LinearScale : linear transfrom
3205
3234
3206
- Set the scaling of the y-axis: %(scale)s
3235
+ matplotlib.scale.LogTransform : log transform
3207
3236
3208
- ACCEPTS: [%(scale)s]
3237
+ matplotlib.scale.SymmetricalLogTransform : symlog transform
3209
3238
3210
- Different kwargs are accepted, depending on the scale:
3211
- %(scale_docs)s
3239
+ matplotlib.scale.LogisticTransform : logit transform
3212
3240
"""
3213
3241
# If the scale is being set to log, clip nonposy to prevent headaches
3214
3242
# around zero
@@ -3281,18 +3309,22 @@ def get_yticklabels(self, minor=False, which=None):
3281
3309
self .yaxis .get_ticklabels (minor = minor ,
3282
3310
which = which ))
3283
3311
3284
- @docstring .dedent_interpd
3285
3312
def set_yticklabels (self , labels , fontdict = None , minor = False , ** kwargs ):
3286
3313
"""
3287
- Set the y tick labels with list of strings * labels*
3314
+ Set the y- tick labels with list of strings labels
3288
3315
3289
- Return a list of :class:`~matplotlib.text.Text` instances.
3316
+ Parameters
3317
+ ----------
3318
+ labels : list of str
3319
+ list of string labels
3290
3320
3291
- *kwargs* set :class:`~matplotlib.text.Text` properties for the labels.
3292
- Valid properties are
3293
- %( Text)s
3321
+ Returns
3322
+ -------
3323
+ A list of `~matplotlib.text. Text` instances.
3294
3324
3295
- ACCEPTS: sequence of strings
3325
+ Other Parameters
3326
+ ----------------
3327
+ **kwargs : `~matplotlib.text.Text` properties.
3296
3328
"""
3297
3329
if fontdict is not None :
3298
3330
kwargs .update (fontdict )
@@ -3872,15 +3904,21 @@ def twinx(self):
3872
3904
"""
3873
3905
Create a twin Axes sharing the xaxis
3874
3906
3875
- create a twin of Axes for generating a plot with a sharex
3876
- x-axis but independent y axis. The y-axis of self will have
3907
+ Create a twin of Axes for generating a plot with a shared
3908
+ x-axis but independent y- axis. The y-axis of self will have
3877
3909
ticks on left and the returned axes will have ticks on the
3878
3910
right. To ensure tick marks of both axis align, see
3879
- :class: `~matplotlib.ticker.LinearLocator`
3911
+ `~matplotlib.ticker.LinearLocator`
3880
3912
3881
- .. note::
3882
- For those who are 'picking' artists while using twinx, pick
3883
- events are only called for the artists in the top-most axes.
3913
+ Returns
3914
+ -------
3915
+ Axis
3916
+ The newly created axis
3917
+
3918
+ Notes
3919
+ -----
3920
+ For those who are 'picking' artists while using twinx, pick
3921
+ events are only called for the artists in the top-most axes.
3884
3922
"""
3885
3923
ax2 = self ._make_twin_axes (sharex = self )
3886
3924
ax2 .yaxis .tick_right ()
@@ -3895,14 +3933,20 @@ def twiny(self):
3895
3933
"""
3896
3934
Create a twin Axes sharing the yaxis
3897
3935
3898
- create a twin of Axes for generating a plot with a shared
3899
- y-axis but independent x axis. The x-axis of self will have
3936
+ Create a twin of Axes for generating a plot with a shared
3937
+ y-axis but independent x- axis. The x-axis of self will have
3900
3938
ticks on bottom and the returned axes will have ticks on the
3901
3939
top.
3902
3940
3903
- .. note::
3904
- For those who are 'picking' artists while using twiny, pick
3905
- events are only called for the artists in the top-most axes.
3941
+ Returns
3942
+ -------
3943
+ Axis
3944
+ The newly created axis
3945
+
3946
+ Notes
3947
+ ------
3948
+ For those who are 'picking' artists while using twiny, pick
3949
+ events are only called for the artists in the top-most axes.
3906
3950
"""
3907
3951
3908
3952
ax2 = self ._make_twin_axes (sharey = self )
0 commit comments