Reputation: 1222
I'm clueless when it comes to which renderer to use for MATLAB figures or when it matters, but I have come across certain examples where it does matter:
plot(0,0,'ko','markersize',50,'linewidth',8);
set(gcf,'renderer','opengl');
set(gcf,'renderer','painters');
Left=OpenGL, Right=Painters:
(running Windows 7 Professional and MATLAB R2015b)
Are there times when using the OpenGL renderer produces better results than Painters? In general how do the two renderers differ?
Upvotes: 6
Views: 10656
Reputation: 662
These are the differences I know of
From the Mathworks website (Scroll down to "renderer"):
'opengl' — OpenGL® renderer. This option enables MATLAB to access graphics hardware if it is available on your system. The OpenGL renderer displays objects sorted in front to back order, as seen on the monitor. Lines always draw in front of faces when at the same location on the plane of the monitor.
'painters' — Painters renderer. This option works well for axes in a 2-D view. In 2-D, the Painters renderer sorts graphics objects by child order (order specified). In 3-D, the Painters renderer sorts objects in front to back order. However, it might not correctly draw intersecting polygons in 3-D.
See also this link on fixing low level graphics issues with OpenGL.
Upvotes: 1