I use the following code for plotting and saving 8 figures. This code does not show all 8 figures in one time. How to do that? because now we should close one figure and another one appears.
and how can change the name and title of figure once for each figure using the values of data in data
file?
for example Fig1: ng = 100
, Fig2: ng = 250
and so on. 100
and 250
are the data inside the datafile.
Thank you
row, uf, ng, Tg = np.genfromtxt('texdata.txt',unpack=True)
fig, (ax1) = plt.subplots(1)
for x in range(len(ng)):
for xx in range(1,819):
ET_list=[]
z_list=[]
for z in np.arange(1,7):
Ju = dfimppara.iloc[xx, 1]
Jl = dfimppara.iloc[xx, 2]
lim = Ju - Jl
if lim > 1:
pass
else:
if Ju<7:
ET_list.append(ET(xx, z, 100, 1e9, 1, ng[x], 0, Tg[x], 1))
z_list.append(z)
plt.plot(z_list, ET_list))
else:
pass
ax1.title.set_text('Fig 1: ng = 100 ') # we need to change this value for each figure and number of the figure
plt.savefig('Fig1:T_j.png') # number of the figure should change
plt.show()