Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. from matplotlib import cm
  2. from mpl_toolkits.mplot3d import Axes3D
  3. import matplotlib.pyplot as plt
  4. import numpy as np
  5. fig = plt.figure()
  6. ax = fig.gca(projection='3d')
  7. X = np.arange(-10, 10, 0.1)
  8. Y = np.arange(-10, 10, 0.1)
  9. X, Y = np.meshgrid(X, Y)
  10. R = np.sqrt(X**2 + Y**2)
  11. Z = np.sin(R)
  12. surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm)
  13. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement