例2.56 画出三维表面图
点击查看代码
import pylab as plt
import numpy as np
x=np.linspace(-4,4,100);
x,y=np.meshgrid(x,x)
z=50*np.sin(x+y);
ax=plt.axes(projection='3d')
ax.plot_surface(x, y, z, color='y')
plt.show()
print("学号:2023310143004")
import pylab as plt
import numpy as np
x=np.linspace(-4,4,100);
x,y=np.meshgrid(x,x)
z=50*np.sin(x+y);
ax=plt.axes(projection='3d')
ax.plot_surface(x, y, z, color='y')
plt.show()
print("学号:2023310143004")