I wrote this code: I wrote this code: I am trying to plot the two arrays x "the data number" and y "the data itself"
for t in range(1, 281):
data[t] = (3600 + (240 + t * 4) + 281)
for r in range(1, 281):
sn[r] = r
x = np.array(sn[r])
y = np.array(data[t])
plt.plot(x, y)
where is the problem
After plotting the data with
plt.plot(x,y)
you need to show the plot withplt.show()
. Alternatively you can save the plot directly to disk withplt.savefig("Myfile.png",format="png")
.