MATLAB: Combine surfaces into one big surface

combine surface patch

Hi,
I have a lot of surfaces and patches in a single plot; surf(this) surf(that). 376 in total. (I also have a struct with 376 handles to all surfaces/patches). Each patch on its own is pretty small, but every call to patch seems to be a call to the graphics renderer. To speed up the display updating, i would like to combine all surfaces, or patches, into one big surface. Is there an easy way to do this? All surfaces have the same color and all surfaces are stationary relative to each other. I was thinking about something like get all the handles and combine them into one handle somehow with al the vertexdata/facedata combined.

Best Answer

but every call to patch seems to be a call to the graphics renderer.
You could try generating handles to the surf/patch objects without rendering them, by calling
h(i) = patch(...,'Visible','off');
and similarly for surf. Once you've generated a vector of handles this way, and you're ready to display, you can make the entire plot visible by doing
set(h,'Visible','on')