@@ -1644,13 +1644,15 @@ def axis(self, *args, emit=True, **kwargs):
1644
1644
'equal' Set equal scaling (i.e., make circles circular) by
1645
1645
changing axis limits.
1646
1646
'scaled' Set equal scaling (i.e., make circles circular) by
1647
- changing dimensions of the plot box.
1648
- 'tight' Set limits just large enough to show all data.
1647
+ changing dimensions of the plot box, then disable further
1648
+ autoscaling.
1649
+ 'tight' Set limits just large enough to show all data, then
1650
+ disable further autoscaling.
1649
1651
'auto' Automatic scaling (fill plot box with data).
1650
1652
'normal' Same as 'auto'; deprecated.
1651
1653
'image' 'scaled' with axis limits equal to data limits.
1652
1654
'square' Square plot; similar to 'scaled', but initially forcing
1653
- ``xmax-xmin = ymax-ymin``.
1655
+ ``xmax-xmin == ymax-ymin``.
1654
1656
======== ==========================================================
1655
1657
1656
1658
emit : bool, optional, default *True*
@@ -2366,16 +2368,12 @@ def autoscale(self, enable=True, axis='both', tight=None):
2366
2368
None leaves the autoscaling state unchanged.
2367
2369
2368
2370
axis : {'both', 'x', 'y'}, optional
2369
- which axis to operate on; default is 'both'
2371
+ Which axis to operate on; default is 'both'.
2370
2372
2371
2373
tight : bool or None, optional
2372
- If True, set view limits to data limits;
2373
- if False, let the locator and margins expand the view limits;
2374
- if None, use tight scaling if the only artist is an image,
2375
- otherwise treat *tight* as False.
2376
- The *tight* setting is retained for future autoscaling
2377
- until it is explicitly changed.
2378
-
2374
+ If True, first set the margins to zero. Then, this argument is
2375
+ forwarded to `autoscale_view` (regardless of its value); see the
2376
+ description of its behavior there.
2379
2377
"""
2380
2378
if enable is None :
2381
2379
scalex = True
@@ -2399,17 +2397,31 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True):
2399
2397
"""
2400
2398
Autoscale the view limits using the data limits.
2401
2399
2402
- You can selectively autoscale only a single axis, e.g., the xaxis by
2403
- setting *scaley* to *False*. The autoscaling preserves any
2404
- axis direction reversal that has already been done.
2405
-
2406
- If *tight* is *False*, the axis major locator will be used
2407
- to expand the view limits if rcParams['axes.autolimit_mode']
2408
- is 'round_numbers'. Note that any margins that are in effect
2409
- will be applied first, regardless of whether *tight* is
2410
- *True* or *False*. Specifying *tight* as *True* or *False*
2411
- saves the setting as a private attribute of the Axes; specifying
2412
- it as *None* (the default) applies the previously saved value.
2400
+ Parameters
2401
+ ----------
2402
+ tight : bool or None
2403
+ If *True*, only expand the axis limits using the margins. Note
2404
+ that unlike for `autoscale`, ``tight=True`` does *not* set the
2405
+ margins to zero.
2406
+
2407
+ If *False* and :rc:`axes.autolimit_mode` is 'round_numbers', then
2408
+ after expansion by the margins, further expand the axis limits
2409
+ using the axis major locator.
2410
+
2411
+ If None (the default), reuse the value set in the previous call to
2412
+ `autoscale_view` (the initial value is False, but the default style
2413
+ sets :rc:`axes.autolimit_mode` to 'data', in which case this
2414
+ behaves like True).
2415
+
2416
+ scalex : bool
2417
+ Whether to autoscale the x axis (default is True).
2418
+
2419
+ scaley : bool
2420
+ Whether to autoscale the x axis (default is True).
2421
+
2422
+ Notes
2423
+ -----
2424
+ The autoscaling preserves any preexisting axis direction reversal.
2413
2425
2414
2426
The data limits are not updated automatically when artist data are
2415
2427
changed after the artist has been added to an Axes instance. In that
0 commit comments