matplotlib.pyplot.suptitle

matplotlib.pyplot.suptitle(t, **kwargs)[源代码]

在图形中添加居中的标题。

参数:
tSTR

标题文本。

x浮动,默认为0.5

文本在图形坐标中的X位置。

y浮动,默认为0.98

文本在图形坐标中的Y位置。

水平信号,ha'center'、'left'、'right',默认值:'center'

文本相对于( xy

垂直对准,VA'top'、'center'、'bottom'、'baseline',默认值:'top'

文本相对于( xy

尺寸大小 : default: rcParams["figure.titlesize"] (default: 'large')违约:

文本的字体大小。见 Text.set_size 对于可能的值。

字体重量,重量 : default: rcParams["figure.titleweight"] (default: 'normal')违约:

文本的字体粗细。见 Text.set_weight 对于可能的值。

返回:
文本

这个 Text 标题的实例。

其他参数:
fontproperties无或听写,可选

字体属性的字典。如果 字体属性 给定的字体大小和粗细的默认值取自 FontProperties 默认值。 rcParams["figure.titlesize"] (default: 'large') 和 rcParams["figure.titleweight"] (default: 'normal') 在这种情况下被忽略。

**kwargs

额外的禁运是 matplotlib.text.Text 性质。

实例

>>> fig.suptitle('This is the figure title', fontsize=12)

使用实例 matplotlib.pyplot.suptitle