FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #32421 from Ryanakml/fix/20984-consistent-margins-… · matplotlib/matplotlib@eb29082 · GitHub

Commit eb29082

Browse files
authored
Merge pull request #32421 from Ryanakml/fix/20984-consistent-margins-docs
DOC: synchronize Axes.margins docs with set_xmargin/set_ymargin
2 parents 44f2e00 + 6c6cbd1 commit eb29082

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎lib/matplotlib/axes/_base.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2871,6 +2871,13 @@ def margins(self, *margins, x=None, y=None, tight=True):
28712871
28722872
.. plot:: _embedded_plots/axes_margins.py
28732873
2874+
The margin is a fraction of the data interval: *margin* times the
2875+
data interval is added to each end of that interval before it is
2876+
used in autoscaling. If the margin is negative, the data range is
2877+
clipped instead of expanded. For example, if your data is in the
2878+
range [0, 2], a margin of 0.1 will result in a range [-0.2, 2.2];
2879+
a margin of -0.1 will result in a range of [0.2, 1.8].
2880+
28742881
All input parameters must be floats greater than -0.5. Passing both
28752882
positional and keyword arguments is invalid and will raise a TypeError.
28762883
If no arguments (positional or otherwise) are provided, the current
@@ -2917,6 +2924,7 @@ def margins(self, *margins, x=None, y=None, tight=True):
29172924
--------
29182925
:ref:`autoscale_margins`
29192926
.Axes.set_xmargin, .Axes.set_ymargin
2927+
.Axes.set_xlim, .Axes.set_ylim
29202928
"""
29212929

29222930
if margins and (x is not None or y is not None):

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL