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.

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')

Matlab ≤ R2014a

  1. Restart Matlab, and before doing anything type:
    opengl('neverselect')
    
  2. plot with
    figure 
    set(gcf,'renderermode','manual','renderer','painters') slice(..)
    

Tags:

Categories:

Updated:

Leave a Comment