1
votes
import numpy as np
import matplotlib.pyplot as plt
x = np.array([1.628,1.548,1,451,1.386,1.280])
y = np.array([0.124,0.086,0.045,0.013,-0.032])
plt.plot(x,y)
plt.show();

Hi,

I know this has been asked before. I have tried to convert the lists into numpy arrays but unfortunately the same error occurs. Can you tell me where I'm going wrong?

1
Change 1,451 to 1.451 in x - ettanany

1 Answers

6
votes

You have a spurious comma in your x definition: 1,451 instead of 1.451.