我是靠谱客的博主 追寻巨人,这篇文章主要介绍python怎么打出来大标题_如何增加plt.title字体大小?,现在分享给大家,希望可以做个参考。

import matplotlib.pyplot as plt

plt.figtext(.5,.9,'Temperature', fontsize=100, ha='center')

plt.figtext(.5,.8,'Humidity',fontsize=30,ha='center')

plt.show()

也许你想要这个。您可以很容易地调整两者的fontsize,并通过更改前两个figtext位置参数来调整放置位置。

ha代表horizontal alignment

或者import matplotlib.pyplot as plt

fig = plt.figure() # Creates a new figure

fig.suptitle('Temperature', fontsize=50) # Add the text/suptitle to figure

ax = fig.add_subplot(111) # add a subplot to the new figure, 111 means "1x1 grid, first subplot"

fig.subplots_adjust(top=0.80) # adjust the placing of subplot, adjust top, bottom, left and right spacing

ax.set_title('Humidity',fontsize= 30) # title of plot

ax.set_xlabel('xlabel',fontsize = 20) #xlabel

ax.set_ylabel('ylabel', fontsize 

最后

以上就是追寻巨人最近收集整理的关于python怎么打出来大标题_如何增加plt.title字体大小?的全部内容,更多相关python怎么打出来大标题_如何增加plt内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(47)

评论列表共有 0 条评论

立即
投稿
返回
顶部