I had this (well, a closely related) problem today. This stackoverflow topic was one of the top search engine results, so I thought I'd provide future searchers with some further info.
I was using a VideoWriter
object, and calling frame=getframe(fig_handle)
to save each frame to the video. As in the question to this topic, only 1 frame was saved. In addition, the background behind the figure could be seen through it, as if the figure was partially transparent.
Changing renders to painters or zbuffer worked. (set(gcf,'renderer','zbuffer')
for example.)
I needed openGL rendering though, since the movie used transparency. The key to making this work was to use
opengl('software')
This circumvented what was probably an issue with sending the graphics to and from the video card (I don't know for sure... it worked, and I moved on).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…