使用plt.suptitle即可添加总标题。
下面是参数说明
t : str
The title text.
x : float, default 0.5
The x location of the text in figure coordinates.
y : float, default 0.98
The y location of the text in figure coordinates.
horizontalalignment, ha : {'center', 'left', right'}, default: 'center'
The horizontal alignment of the text relative to (*x*, *y*).
verticalalignment, va : {'top', 'center', 'bottom', 'baseline'}, \
default: 'top'
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.
举例说明 参数使用。
plt.suptitle(string,fontsize=60,x=0.5,y=0.98)
使用发现有的时候使用水平、垂直无法调节位置,还是直接设置x、y轴比较靠谱


989

被折叠的 条评论
为什么被折叠?



