MatPlot 3D Detective
After MatPlot Detective (2D). Now 3D axes: wireframe, surface, scatter, and a Slider.
改 plt 代码,按运行,让你的图对上左边。 Fix the matplotlib, press Run, match the target.
| Command | Effect |
|---|---|
projection="3d" | 3D axes |
ax.plot(x, y, z) | 3D line |
set_zlabel | z-axis label |
view_init(elev, azim) | camera |
plot_wireframe | 3D wire mesh |
plot_surface | 3D surface |
scatter on 3D axes | 3D scatter |
bar3d | 3D bars |
from matplotlib.widgets import Slider | slider widget |
Slider(airwaves, '# Waves', 1, 20, valinit=T) | waves slider |
snumwaves.on_changed(update) | redraw on slide |
The slider does not drag in this sandbox (Agg). It still has to be in the figure, and update must run at valinit. Rotate and scale surfaces in MatPlot Studio.