MATLAB: Are UIPANELs renderered incorrectly, when using the OpenGL renderer

7.0MATLABopenglr14renderrendereruipanel

I've created a uipanel object in a figure:
u = uipanel(,'Units','pixels','Position',[20 20 200 200]);
If I switch the figure's Renderer to OpenGL
set(gcf,'Renderer','opengl')
Then the uipanel is rendered improperly. Specifically, the background of the uipanel is rendered in the wrong location, but the border is in the proper place.

Best Answer

This bug has been fixed for Release 14 SP1 (R14SP1). For previous releases, please read below for any possible workarounds:
This is a bug in MATLAB 7.0 (R14), related to the calculation of the location of the background area in uipanels.
As a work around, use the zbuffer or painters renderers:
set(gcf,'Renderer','zbuffer')
set(gcf,'Renderer','painters')