Skip to content

Commit

Permalink
DOC: Document the parameter *position* of apply_aspect() as internal
Browse files Browse the repository at this point in the history
  • Loading branch information
timhoffm committed Jun 4, 2024
1 parent 479bd7a commit c231654
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1881,6 +1881,11 @@ def apply_aspect(self, position=None):
Parameters
----------
position : None or .Bbox
.. note::
This parameter exists for historic reasons and is considered
internal. End users should not use it.
If not ``None``, this defines the position of the
Axes within the figure as a Bbox. See `~.Axes.get_position`
for further details.
Expand All @@ -1891,6 +1896,10 @@ def apply_aspect(self, position=None):
to call it yourself if you need to update the Axes position and/or
view limits before the Figure is drawn.
An alternative with a broader scope is `.Figure.draw_without_rendering`,
which updates all stale components of a figure, not only the positioning /
view limits of a single Axes.
See Also
--------
matplotlib.axes.Axes.set_aspect
Expand All @@ -1899,6 +1908,8 @@ def apply_aspect(self, position=None):
Set how the Axes adjusts to achieve the required aspect ratio.
matplotlib.axes.Axes.set_anchor
Set the position in case of extra space.
matplotlib.figure.Figure.draw_without_rendering
Update all stale components of a figure.
"""
if position is None:
position = self.get_position(original=True)
Expand Down

0 comments on commit c231654

Please sign in to comment.