绘制函数y=sin(x)的散点图,请从以下选项中选出你认为正确的答案:( ) 公共代码如下: import numpy as np import matplotlib. pyplot as plt x = np.linspace(0.1, 2*np. pi, 50) y = np.sin(x)
选项:
A:fig = plt.figure()\nplt.plot(x,y)\nplt.show()
B:fig = plt.figure()\nplt.barh(x,y)\nplt.show()
C:fig = plt.figure ()\nplt.bar(x,y)\nplt.show()
D:fig = plt.figure ()\nplt.scatter(x,y)\nplt.show()
发布时间:2024-04-19 21:32:10