How can I plot separate Pandas DataFrames as subplots?

后端 未结 9 2139
离开以前
离开以前 2020-11-22 17:00

I have a few Pandas DataFrames sharing the same value scale, but having different columns and indices. When invoking df.plot(), I get separate plot images. what

9条回答
  •  感情败类
    2020-11-22 17:52

    You can use this:

    fig = plt.figure()
    ax = fig.add_subplot(221)
    plt.plot(x,y)
    
    ax = fig.add_subplot(222)
    plt.plot(x,z)
    ...
    
    plt.show()
    

提交回复
热议问题