我有以下代码:
from pandas_datareader import data as web
df = web.DataReader('goog','yahoo', start="2021-07-3", end="2021-09-12")
mpf.plot(df, style='charles', type = 'candle', volume=True, figratio=(12,8), title = "new title \n another title")

您能告诉我如何更改换行符another title的字体和大小吗?
发布于 2021-09-16 17:05:10
然后使用标准的style方法添加axes title和figure suptitle,因为title在mpf.plot中实际上是figure suptitle,而不是style这样的文本属性的。
df = web.DataReader('goog','yahoo', start="2021-07-3", end="2021-09-12")
fig, axlist = mpf.plot(df, style='charles', type = 'candle', volume=True, figratio=(12,8), returnfig=True)
# add a new suptitle
fig.suptitle('Figure Title', y=1.05, fontsize=30, x=0.59)
# add a title the the correct axes
axlist[0].set_title('Axis Title', fontsize=25, style='italic', fontfamily='fantasy', loc='center')
# save the figure
fig.savefig('test.jpg', bbox_inches='tight')

https://stackoverflow.com/questions/69210734
复制相似问题