Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix the docstring of suptitle/subxlabel/supylabel. #19140

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
Dec 17, 2020
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
23 changes: 8 additions & 15 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,38 +373,32 @@ def get_window_extent(self, *args, **kwargs):

def _suplabels(self, t, info, **kwargs):
"""
Add a centered {name} to the figure.
Add a centered %(name)s to the figure.

Parameters
----------
t : str
The {name} text.

x : float, default: {x0}
The %(name)s text.
x : float, default: %(x0)s
The x location of the text in figure coordinates.

y : float, default: {y0}
y : float, default: %(y0)s
The y location of the text in figure coordinates.

horizontalalignment, ha : {{'center', 'left', 'right'}}, default: {ha}
horizontalalignment, ha : {'center', 'left', 'right'}, default: %(ha)s
The horizontal alignment of the text relative to (*x*, *y*).

verticalalignment, va : {{'top', 'center', 'bottom', 'baseline'}}, \
default: {va}
verticalalignment, va : {'top', 'center', 'bottom', 'baseline'}, \
default: %(va)s
The vertical alignment of the text relative to (*x*, *y*).

fontsize, size : default: :rc:`figure.titlesize`
The font size of the text. See `.Text.set_size` for possible
values.

fontweight, weight : default: :rc:`figure.titleweight`
The font weight of the text. See `.Text.set_weight` for possible
values.

Returns
-------
text
The `.Text` instance of the {name}.
The `.Text` instance of the %(name)s.

Other Parameters
----------------
Expand All @@ -416,7 +410,6 @@ def _suplabels(self, t, info, **kwargs):

**kwargs
Additional kwargs are `matplotlib.text.Text` properties.

"""

manual_position = ('x' in kwargs or 'y' in kwargs)
Expand Down