from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm import matplotlib.pyplot as plt import numpy as np fig = plt.figure(figsize=(10,10)) ax = fig.add_subplot(111, projection="3d") ax.set_xlabel("x") ax.set_ylabel("y") ax.set_zlabel("z") X = np.arange(-15, 15, 0.5) Y = np.arange(-15, 15, 0.5) X, Y = np.meshgrid(X, Y) Z = -(X**2 + Y**3) surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet, linewidth=0, antialiased=True) plt.show()