You want to plot a 3D surface of the function z = sin(sqrt(x² + y²)) over the range -6 to 6 for both x and y. Which code snippet correctly prepares the data for ax.plot_surface?
hard📝 Application Q8 of 15
Matplotlib - 3D Plotting
You want to plot a 3D surface of the function z = sin(sqrt(x² + y²)) over the range -6 to 6 for both x and y. Which code snippet correctly prepares the data for ax.plot_surface?
Aimport numpy as np\nx = np.linspace(-6, 6, 50)\ny = np.linspace(-6, 6, 50)\nX, Y = np.meshgrid(x, y)\nZ = np.sin(np.sqrt(x + y))