Stop 3-D plot crashing on Matlab over VNC

Matlab might need plot render reconfiguration to work properly over VNC–here’s how to fix 3-D plot rendering in Matlab for VNC.

VNC with Matlab >= R2014b

Matlab >= R2014b auto-select software OpenGL when using X-Forwarding. You can get much faster performance for rotating and viewing 3-D figures by in Matlab:

set(gcf,'renderermode','manual','renderer','zbuffer')

The Matlab default below is much slower but less prone to crash:

set(gcf,'renderermode','manual','renderer','painters')

VNC with Matlab <= R2014a

Restart Matlab, and before doing anything type:

opengl('neverselect')

Then at plotting time:

figure 
set(gcf,'renderermode','manual','renderer','painters') slice(..)

Tags:

Categories:

Updated:

Leave a Comment