有没有方法可以访问pandas.DataFrame.plot(subplots=True)
返回的轴?我想给每个绘图赋予一个标题(并访问其他属性),但我当前的尝试只影响最后一个子图。在
svv[['Flow2 L/s','GWT','DOC mg/L', 'Hgtot ng/L', 'MeHg ng/L']].dropna().plot(subplots=True, figsize=(20, 20))
plt.legend(loc='best')
ax[0].set_title('title1') # Doesn't alter any of the plots
ax[1].set_title('title2') # Doesn't alter any of the plots
plt.title('5 plots') # Title appears above the last plot
我也尝试过使用matplotlib.subplots()
单独创建子图,但这导致共享的x轴不再仅仅是在所有被绘制的Series
的交集处。在
{1>调用的结果是返回的。您可以将其存储在变量中:
相关问题 更多 >
编程相关推荐