@@ -1617,13 +1617,15 @@ def axis(self, *args, **kwargs):
16171617 'equal' Set equal scaling (i.e., make circles circular) by
16181618 changing axis limits.
16191619 'scaled' Set equal scaling (i.e., make circles circular) by
1620- changing dimensions of the plot box.
1621- 'tight' Set limits just large enough to show all data.
1620+ changing dimensions of the plot box, then disable further
1621+ autoscaling.
1622+ 'tight' Set limits just large enough to show all data, then
1623+ disable further autoscaling.
16221624 'auto' Automatic scaling (fill plot box with data).
16231625 'normal' Same as 'auto'; deprecated.
16241626 'image' 'scaled' with axis limits equal to data limits.
16251627 'square' Square plot; similar to 'scaled', but initially forcing
1626- ``xmax-xmin = ymax-ymin``.
1628+ ``xmax-xmin == ymax-ymin``.
16271629 ======== ==========================================================
16281630
16291631 emit : bool, optional, default *True*
@@ -2348,16 +2350,12 @@ def autoscale(self, enable=True, axis='both', tight=None):
23482350 None leaves the autoscaling state unchanged.
23492351
23502352 axis : {'both', 'x', 'y'}, optional
2351- which axis to operate on; default is 'both'
2353+ Which axis to operate on; default is 'both'.
23522354
23532355 tight : bool or None, optional
2354- If True, set view limits to data limits;
2355- if False, let the locator and margins expand the view limits;
2356- if None, use tight scaling if the only artist is an image,
2357- otherwise treat *tight* as False.
2358- The *tight* setting is retained for future autoscaling
2359- until it is explicitly changed.
2360-
2356+ If True, first set the margins to zero. Then, this argument is
2357+ forwarded to `autoscale_view` (regardless of its value); see the
2358+ description of its behavior there.
23612359 """
23622360 if enable is None :
23632361 scalex = True
@@ -2381,17 +2379,31 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True):
23812379 """
23822380 Autoscale the view limits using the data limits.
23832381
2384- You can selectively autoscale only a single axis, e.g., the xaxis by
2385- setting *scaley* to *False*. The autoscaling preserves any
2386- axis direction reversal that has already been done.
2387-
2388- If *tight* is *False*, the axis major locator will be used
2389- to expand the view limits if rcParams['axes.autolimit_mode']
2390- is 'round_numbers'. Note that any margins that are in effect
2391- will be applied first, regardless of whether *tight* is
2392- *True* or *False*. Specifying *tight* as *True* or *False*
2393- saves the setting as a private attribute of the Axes; specifying
2394- it as *None* (the default) applies the previously saved value.
2382+ Parameters
2383+ ----------
2384+ tight : bool or None
2385+ If *True*, only expand the axis limits using the margins. Note
2386+ that unlike for `autoscale`, ``tight=True`` does *not* set the
2387+ margins to zero.
2388+
2389+ If *False* and :rc:`axes.autolimit_mode` is 'round_numbers', then
2390+ after expansion by the margins, further expand the axis limits
2391+ using the axis major locator.
2392+
2393+ If None (the default), reuse the value set in the previous call to
2394+ `autoscale_view` (the initial value is False, but the default style
2395+ sets :rc:`axes.autolimit_mode` to 'data', in which case this
2396+ behaves like True).
2397+
2398+ scalex : bool
2399+ Whether to autoscale the x axis (default is True).
2400+
2401+ scaley : bool
2402+ Whether to autoscale the x axis (default is True).
2403+
2404+ Notes
2405+ -----
2406+ The autoscaling preserves any preexisting axis direction reversal.
23952407
23962408 The data limits are not updated automatically when artist data are
23972409 changed after the artist has been added to an Axes instance. In that
0 commit comments