设置第二条 y 轴,然后将 ax 传入 df.plot ax1 = df.plot(x='x1', y='y1', figsize=(20,4)) ax2 = ax1.twinx() df.plot(x='x1', y='y2', figsize=(20,4), color='orange', ax=ax2) ```! ..

pandas 绘制双 y 轴图

设置第二条 y 轴,然后将 ax 传入 df.plot

    ax1 = df.plot(x='x1', y='y1', figsize=(20,4))
    ax2 = ax1.twinx() 
    df.plot(x='x1', y='y2', figsize=(20,4), color='orange', ax=ax2)

```![Gridpowervarietywithoutsidetemperaturein20151102.png](https://img.hacpai.com/file/2019/08/Gridpowervarietywithoutsidetemperaturein20151102-7dc2d9c0.png)
回帖   
请输入回帖内容...