@@ -2217,6 +2217,12 @@ def set_xmargin(self, m):
2217
2217
2218
2218
*m* times the data interval will be added to each
2219
2219
end of that interval before it is used in autoscaling.
2220
+ For example, if your data is in the range [0, 2], a factor of
2221
+ ``m = 0.1`` will result in a range [-0.2, 2.2].
2222
+
2223
+ Negative values -0.5 < m < 0 will result in clipping of the data range.
2224
+ I.e. for a data range [0, 2], a factor of ``m = -0.1`` will result in
2225
+ a range [0.2, 1.8].
2220
2226
2221
2227
..
2222
2228
ACCEPTS: float greater than -0.5
@@ -2236,6 +2242,12 @@ def set_ymargin(self, m):
2236
2242
2237
2243
*m* times the data interval will be added to each
2238
2244
end of that interval before it is used in autoscaling.
2245
+ For example, if your data is in the range [0, 2], a factor of
2246
+ ``m = 0.1`` will result in a range [-0.2, 2.2].
2247
+
2248
+ Negative values -0.5 < m < 0 will result in clipping of the data range.
2249
+ I.e. for a data range [0, 2], a factor of ``m = -0.1`` will result in
2250
+ a range [0.2, 1.8].
2239
2251
2240
2252
..
2241
2253
ACCEPTS: float greater than -0.5
@@ -2333,23 +2345,23 @@ def autoscale(self, enable=True, axis='both', tight=None):
2333
2345
if autoscaling for either axis is on, it performs
2334
2346
the autoscaling on the specified axis or axes.
2335
2347
2336
- *enable*: [True | False | None]
2348
+ Parameters
2349
+ ----------
2350
+ enable : [True | False | None], optional
2337
2351
True (default) turns autoscaling on, False turns it off.
2338
2352
None leaves the autoscaling state unchanged.
2339
2353
2340
- * axis* : ['x ' | 'y ' | 'both']
2354
+ axis : ['both ' | 'x ' | 'y'], optional
2341
2355
which axis to operate on; default is 'both'
2342
2356
2343
- * tight* : [True | False | None]
2357
+ tight: [None | True | False], optional
2344
2358
If True, set view limits to data limits;
2345
2359
if False, let the locator and margins expand the view limits;
2346
2360
if None, use tight scaling if the only artist is an image,
2347
2361
otherwise treat *tight* as False.
2348
2362
The *tight* setting is retained for future autoscaling
2349
2363
until it is explicitly changed.
2350
2364
2351
-
2352
- Returns None.
2353
2365
"""
2354
2366
if enable is None :
2355
2367
scalex = True
@@ -2371,8 +2383,9 @@ def autoscale(self, enable=True, axis='both', tight=None):
2371
2383
2372
2384
def autoscale_view (self , tight = None , scalex = True , scaley = True ):
2373
2385
"""
2374
- Autoscale the view limits using the data limits. You can
2375
- selectively autoscale only a single axis, e.g., the xaxis by
2386
+ Autoscale the view limits using the data limits.
2387
+
2388
+ You can selectively autoscale only a single axis, e.g., the xaxis by
2376
2389
setting *scaley* to *False*. The autoscaling preserves any
2377
2390
axis direction reversal that has already been done.
2378
2391
@@ -2761,18 +2774,20 @@ def locator_params(self, axis='both', tight=None, **kwargs):
2761
2774
"""
2762
2775
Control behavior of tick locators.
2763
2776
2764
- Keyword arguments:
2765
-
2766
- *axis*
2767
- ['x' | 'y' | 'both'] Axis on which to operate;
2768
- default is 'both'.
2777
+ Parameters
2778
+ ----------
2779
+ axis : ['both' | 'x' | 'y'], optional
2780
+ The axis on which to operate.
2769
2781
2770
- * tight*
2771
- [True | False | None] Parameter passed to :meth:`autoscale_view`.
2782
+ tight : [None | True | False], optional
2783
+ Parameter passed to :meth:`autoscale_view`.
2772
2784
Default is None, for no change.
2773
2785
2774
- Remaining keyword arguments are passed to directly to the
2775
- :meth:`~matplotlib.ticker.MaxNLocator.set_params` method.
2786
+ Other Parameters
2787
+ ----------------
2788
+ **kw :
2789
+ Remaining keyword arguments are passed to directly to the
2790
+ :meth:`~matplotlib.ticker.MaxNLocator.set_params` method.
2776
2791
2777
2792
Typically one might want to reduce the maximum number
2778
2793
of ticks and use tight bounds when plotting small
@@ -4217,9 +4232,9 @@ def twiny(self):
4217
4232
return ax2
4218
4233
4219
4234
def get_shared_x_axes (self ):
4220
- ' Return a copy of the shared axes Grouper object for x axes'
4235
+ """ Return a copy of the shared axes Grouper object for x axes."""
4221
4236
return self ._shared_x_axes
4222
4237
4223
4238
def get_shared_y_axes (self ):
4224
- ' Return a copy of the shared axes Grouper object for y axes'
4239
+ """ Return a copy of the shared axes Grouper object for y axes."""
4225
4240
return self ._shared_y_axes
0 commit comments