Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import numpy as np
- from mpl_toolkits.mplot3d import Axes3D
- fig = plt.figure()
- ax = fig.add_subplot(111, projection='3d')
- x = np.linspace(-2,2,60)
- y = np.linspace(-2,2,60)
- xx, yy = np.meshgrid(x,y)
- z = xx**2 + yy**3
- surf = ax.plot_surface(xx, yy, z, cmap="viridis")
- ax.set_xlabel('x axis') # <====== This works
- ax.yaxis.set_label('y axis') # <====== This doesn't work
- ax.zaxis.set_label('z axis') # <====== This doesn't work
Add Comment
Please, Sign In to add comment