df.plot(use_index=False,y=['price','vol'],secondary_y=['vol'],figsize=(12,9))
X轴为时间时的良好展示
# 参数x_compat=True实现:
ts = Series(np.random.randn(1000), index=pd.date_range('1/1/2000',periods=1000))
df = DataFrame(np.random.randn(1000, 4), index=ts.index, columns=list('ABCD'))
df = df.cumsum()
# df.A.plot()
df.A.plot(x_compat=True)
plt.show()
Python Pandas绘制双Y轴