Python 如何使用此特定打印格式设置标题大小

Python 如何使用此特定打印格式设置标题大小,python,pandas,matplotlib,plot,Python,Pandas,Matplotlib,Plot,请原谅我,如果这不是最新的问题,但在研究该网站后,我无法确定一个相关的例子。我想用以下代码直接在熊猫图中设置标题大小: df['attribute'].value_counts().plot('bar', title='The title') 我必须在“绘图”方法中设置什么属性?使用: df = pd.DataFrame({'attribute': list('aabbbcccd')}) ax = df['attribute'].value_counts().plot(kind='bar',

请原谅我,如果这不是最新的问题,但在研究该网站后,我无法确定一个相关的例子。我想用以下代码直接在熊猫图中设置标题大小:

df['attribute'].value_counts().plot('bar', title='The title')
我必须在“绘图”方法中设置什么属性?

使用:

df = pd.DataFrame({'attribute': list('aabbbcccd')})
ax = df['attribute'].value_counts().plot(kind='bar', title='The title')
ax.title.set_size(20)


mhmhm无法将其直接放入plot方法中?实际上,我遇到了一个错误:“list”对象没有属性“title”您的pandas和matplotlib版本是什么?我有pandas 0.24.2和matplotlib 2.2.3以及Python 3。6@Odisseo-是否可以升级?在
0.25.0
matplotlib:3.1.0