I posted a question earlier about how to repeatedly plot (i.e. animate) a changing surface without having multiple surfaces just accumulate in the plot. Eric Firing suggested using Axes3DI.hold(False), but this didn't work; is that a bug, or is that expected? If it's a bug, how can I file it?
I'm using matplotlib 0.87.7. To reproduce this weirdness, run the following code:
# some code to illustrate that Axes3D.hold() doesn't work as expected
import numpy as N
import pylab as P
import matplotlib.axes3d as P3
P.ion() fig = P.gcf()
ax3d = P3.Axes3D(fig)
xGrid, yGrid = P.meshgrid(*[N.linspace(-1., 1., 100)]*2)
zGrid = xGrid**2+yGrid**2
numFrames = 10
scales = N.linspace(-1., 1., numFrames)
for scale in scales:
ax3d.plot_surface( xGrid, yGrid, zGrid*scale )
ax3d.contour3D( xGrid, yGrid, zGrid*scale )
# Note that using P.hold instead of ax3d.hold doesn't work either.