0

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

1
  • 4
    Add plt.show() to actually show the plots. Commented Jun 9, 2015 at 16:06

1 Answer 1

5

After plotting the data with plt.plot(x,y) you need to show the plot with plt.show(). Alternatively you can save the plot directly to disk with plt.savefig("Myfile.png",format="png").

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I knew that it will be something simple. Thanks so much.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.