Skip to content

Minor docstring improvement for set_aspect() #19913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2021
Merged
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
16 changes: 6 additions & 10 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1569,24 +1569,20 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):

Parameters
----------
aspect : {'auto'} or num
aspect : {'auto', 'equal'} or float
Possible values:

======== =================================================
value description
======== =================================================
'auto' automatic; fill the position rectangle with data.
num a circle will be stretched such that the height
is *num* times the width. 'equal' is a synonym
for ``aspect=1``, i.e. same scaling for x and y.
======== =================================================
- 'auto': fill the position rectangle with data.
- 'equal': same as ``aspect=1``, i.e. same scaling for x and y.
- *float*: A circle will be stretched such that the height
is *float* times the width.

adjustable : None or {'box', 'datalim'}, optional
If not ``None``, this defines which parameter will be adjusted to
meet the required aspect. See `.set_adjustable` for further
details.

anchor : None or str or 2-tuple of float, optional
anchor : None or str or (float, float), optional
If not ``None``, this defines where the Axes will be drawn if there
is extra space due to aspect constraints. The most common way to
to specify the anchor are abbreviations of cardinal directions:
Expand Down