Guest User

Untitled

a guest
Nov 14th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3. from mpl_toolkits.mplot3d import Axes3D
  4.  
  5. fig = plt.figure()
  6. ax = fig.add_subplot(111, projection='3d')
  7.  
  8. x = np.linspace(-2,2,60)
  9. y = np.linspace(-2,2,60)
  10.  
  11. xx, yy = np.meshgrid(x,y)
  12.  
  13. z = xx**2 + yy**3
  14.  
  15. surf = ax.plot_surface(xx, yy, z, cmap="viridis")
  16.  
  17. ax.set_xlabel('x axis') # <====== This works
  18. ax.yaxis.set_label('y axis') # <====== This doesn't work
  19. ax.zaxis.set_label('z axis') # <====== This doesn't work
Add Comment
Please, Sign In to add comment