x, y, and format string must not be None のエラーについて
Pythonを始めたばかりの者です。
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0,2*np.pi,50)
def f(x):
np.sin(x)
plt.plot(x,f(x),label ='y')
plt.show()
と入力すると、
ValueError: x, y, and format string must not be None
と表示されます。
このエラーはどういう意味でしょうか、また、原因はなんでしょうか。