Skip to content

Commit d53555b

Browse files
authored
Merge pull request #19140 from anntzer/suplabels-docstring
Fix the docstring of suptitle/subxlabel/supylabel.
2 parents 9372073 + d6e3b02 commit d53555b

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

lib/matplotlib/figure.py

+8-15
Original file line numberDiff line numberDiff line change
@@ -373,38 +373,32 @@ def get_window_extent(self, *args, **kwargs):
373373

374374
def _suplabels(self, t, info, **kwargs):
375375
"""
376-
Add a centered {name} to the figure.
376+
Add a centered %(name)s to the figure.
377377
378378
Parameters
379379
----------
380380
t : str
381-
The {name} text.
382-
383-
x : float, default: {x0}
381+
The %(name)s text.
382+
x : float, default: %(x0)s
384383
The x location of the text in figure coordinates.
385-
386-
y : float, default: {y0}
384+
y : float, default: %(y0)s
387385
The y location of the text in figure coordinates.
388-
389-
horizontalalignment, ha : {{'center', 'left', 'right'}}, default: {ha}
386+
horizontalalignment, ha : {'center', 'left', 'right'}, default: %(ha)s
390387
The horizontal alignment of the text relative to (*x*, *y*).
391-
392-
verticalalignment, va : {{'top', 'center', 'bottom', 'baseline'}}, \
393-
default: {va}
388+
verticalalignment, va : {'top', 'center', 'bottom', 'baseline'}, \
389+
default: %(va)s
394390
The vertical alignment of the text relative to (*x*, *y*).
395-
396391
fontsize, size : default: :rc:`figure.titlesize`
397392
The font size of the text. See `.Text.set_size` for possible
398393
values.
399-
400394
fontweight, weight : default: :rc:`figure.titleweight`
401395
The font weight of the text. See `.Text.set_weight` for possible
402396
values.
403397
404398
Returns
405399
-------
406400
text
407-
The `.Text` instance of the {name}.
401+
The `.Text` instance of the %(name)s.
408402
409403
Other Parameters
410404
----------------
@@ -416,7 +410,6 @@ def _suplabels(self, t, info, **kwargs):
416410
417411
**kwargs
418412
Additional kwargs are `matplotlib.text.Text` properties.
419-
420413
"""
421414

422415
manual_position = ('x' in kwargs or 'y' in kwargs)

0 commit comments

Comments
 (0)