Example: Howto plot a 3d cube/pyramid with plotsurface in matplotlib

Since I haven't found an example, that shows howto plot in 3d a cube and pyramid, respectively,
I wanted to show how I accomplished this without using vtk or mayavi. Unfortunately, it is a bit of an ugly hack, since as far as i know
the plotsurface method cannot directly plot arrays with shape (,x).

3dpyramid.py (1.21 KB)

3dcube.py (1.49 KB)