Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
364 B
1
Indexable
Never
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
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()
Leave a Comment