plot multiple pandas dataframes in one graph

后端 未结 2 821
天涯浪人
天涯浪人 2020-12-15 09:30

I have created 6 different dataframes that eliminate the outliers of their own original data frames. Now, I\'m trying to plot all of the dataframes that eliminate the outlie

2条回答
  •  無奈伤痛
    2020-12-15 09:59

    You need to use the ax parameter in pandas.dataframe.plot.

    Use on the first df.plot to grab a handle on that axes:

    ax = newdf.plot() 
    

    then on subsequent plots use the ax parameter.

    newdf2.plot(ax=ax)
    ...
    newdf5.plot(ax=ax)
    

提交回复
热议问题