Matplotlib - 3D Plotting
You want to plot a 3D scatter plot where point colors represent a fourth variable. Which code correctly creates the 3D axes and applies color mapping?
fig.add_subplot(111, projection='3d') to enable 3D plotting.c=colors and specify a colormap with cmap='viridis'.plt.colorbar(sc) to display the color scale.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions