Speed up MATLAB figures with OpenGL

You can substantially increase your MATLAB figure performance by using OpenGL rendering. Put this in your startup.m file:

set(0, 'DefaultFigureRenderer', 'OpenGL');

You can check if MATLAB has detected your hardware by using:

>> opengl info

Other relevant figure properties are:

>> set(gcf,'Renderer','OpenGL')
>> set(gcf,'RendererMode','manual')

Warning: this breaks saving EPS files as vectorized figures.