This issue is due to a bug in a video driver in Ubuntu. For more information please see this Sun bug report at:
<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6776352>
To work around this issue, add the following line into the java.opts file:
-Dsun.java2d.pmoffscreen=false
To create java.opts file, please follow these steps:
1. Create a text file named java.opts in the $MATLABROOT/bin/$ARCH directory. If you do not have write-access to $MATLABROOT/bin/$ARCH, or if you want a user-specific version, create the java.opts file in the MATLAB startup directory.
$MATLABROOT is the MATLAB root directory, which you find by typing at the MATLAB Command Prompt:
$ARCH is your system architecture, which you find by typing at the MATLAB Command Prompt:
The MATLAB startup directory can be found in two ways:
a) If you launch MATLAB from the command line, it is the current working directory in the command-line window.
b) If you launch MATLAB from a desktop icon, execute the following at the first MATLAB Command Prompt (before any MATLAB code is executed):
After placing the commands above into the java.opts file restart MATLAB. You will need to restart MATLAB after each change to the java.opts file.
Best Answer