Untitled

 avatar
unknown
plain_text
2 years ago
366 B
5
Indexable
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
x = np.arange(-3,3,0.1)
y = np.arange(-3,3,0.1)
X , Y = np.meshgrid(x,y)
Z = X**2-Y**2+X
plt.contourf(X,Y,Z)
plt.savefig('sedlo_a.png')
fig = plt.figure()
ax = Axes3D(fig)
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X,Y,Z)
plt.savefig('sedlo_b.png')
plt.show()
Editor is loading...
Leave a Comment