Matplotlib - 3D Plotting
Identify the error in this code snippet:
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.add_subplot(111, projection='3d') X = np.linspace(-2, 2, 10) Y = np.linspace(-2, 2, 10) Z = X**2 + Y**2 ax.plot_wireframe(X, Y, Z) plt.show()
