Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3613,6 +3613,11 @@ def set_xlim(self, left=None, right=None, *, emit=True, auto=False,
The *left* value may be greater than the *right* value, in which
case the x-axis values will decrease from left to right.

To set limits with additional `.margins` applied, then instead
of `.set_xlim`, modify the ``x0`` and/or ``x1`` attributes on
the ``Axes.dataLim`` `.Bbox` and call `.autoscale` with an
*axis* argument of 'x'.

Examples
--------
>>> set_xlim(left, right)
Expand Down Expand Up @@ -3844,6 +3849,11 @@ def set_ylim(self, bottom=None, top=None, *, emit=True, auto=False,
The *bottom* value may be greater than the *top* value, in which
case the y-axis values will decrease from *bottom* to *top*.

To set limits with additional `.margins` applied, then instead
of `.set_ylim`, modify the ``y0`` and/or ``y1`` attributes on
the ``Axes.dataLim`` `.Bbox` and call `.autoscale` with an
*axis* argument of 'y'.

Examples
--------
>>> set_ylim(bottom, top)
Expand Down