我想使用numpy和matplotlib绘制一个单位圆(cos + sin)。我写了以下内容:
t = np.linspace(0,np.pi*2,100)
circ = np.concatenate((np.cos(t),np.sin(t)))
Run Code Online (Sandbox Code Playgroud)
我策划了,但是失败了。
ax.plot(t,circ,linewidth=1)
ValueError: x and y must have same first dimension
Run Code Online (Sandbox Code Playgroud)