jeudi 7 novembre 2019

Plotting two or more figures inside the for loop in Python

I am going to plot some data using the following code. Here I add another plot but in result I would have just 1 plot. But I expect to have two plots or two figures.

Is there any way to do this in this code?

for z in np.arange(0,7):
            for test in range(0,2):
                Ju_list=[]
                ET_list=[]
                nu_list=[]
                for xx in range(1,819):
                    Ju = dfimppara.iloc[xx, 1]
                    Jl = dfimppara.iloc[xx, 2]
                    lim = Ju - Jl
                    if inp<0:
                        if lim > 1:
                            pass
                        else:
                            Ju_list.append(dfimppara.iloc[xx, 1])
                            ET_list.append(ET(xx, z,test))
                            nu_list.append(dfimppara.iloc[xx, 1] * 115)

                            plt.plot(Ju_list, ET_list)
                            plt.plot(nu_list, ET_list)
                    else: 
                      .... some lines of code
plt.show()

Aucun commentaire:

Enregistrer un commentaire