MATLAB Answers

Why does the MATLAB desktop look blurry when using MATLAB R2013b or R2014a on my Mac with Retina display?

70 views (last 30 days)
The text in MATLAB R2013b and R2014a looks visually less crisp on my Mac computer with a Retina Display.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 13 May 2021
Edited: MathWorks Support Team on 13 May 2021
The reason for this behavior is that MATLAB R2013b (or R2014a) includes a version of the Java Runtime Environment (JRE) that does not currently take advantage of the full display capabilities on MacBook Pros with Retina displays. As a result, MATLAB R2013b will look less sharp than many other Mac applications, including earlier releases of MATLAB. A workaround is to install and use a newer JRE, and restrict your desktop to certain fonts and sizes.
Here are some options for improving the visual appearance of MATLAB:
Open in Low Resolution
This option is the simplest to execute, but it only provides a slight improvement. After completion of these steps, the MATLAB Desktop will appear pixelated, but not blurry. To use this option:
1.  Open a new "Finder" window and navigate to the "Applications" directory.
2.  Select the MATLAB icon and choose "File" > "Get Info".
3.  Check the option "Open in Low Resolution".
4.  Launch MATLAB.
Change the Display Settings
This option is also simple to execute, but it changes your Mac's display settings to shrink all content and give the appearance of more space. Because the application is smaller, the blurriness (or pixelation, if combined with the "Open in Low Resolution" option) is less noticeable. To use this option:
1.  Choose "System Preferences" from the Apple menu in the top-left corner of your screen.
2.  Choose "Display" to open the display settings.
3.  In the "Display" tab, ensure that the "Resolution" type is set to "Scaled".
4.  Select the option for "More Space". This will decrease the size of the content on your screen and offer more space.
5.  Launch MATLAB.
Change the JRE Used by MATLAB
This option requires more advanced steps, but it will enable MATLAB to use the full Retina Display capabilities. This procedure involves downloading a different JRE and pointing MATLAB to use that JRE instead of the one that is shipped with MATLAB. It also applies only to MATLAB that is launched from Terminal. To use this option:
1.  Install Java Runtime 7u45 or newer (but not the forthcoming Java 8) from Oracle’s web site: (Some users experience the cursor insertion pointer issue with u45 as well. But this was not observed in later releases like u60)
2.  Launch the "Terminal" application and set your MATLAB_JAVA environment variable to this JRE as described at the below documentation:
3.  From that same "Terminal" window, execute the following command to launch MATLAB:
The MATLAB Desktop should now appear crisp.
4.  With MATLAB as the active application, choose "MATLAB" > "Preferences" from the menu bar. In the preferences window, navigate to "MATLAB" > "Fonts".
5.  For the "Desktop code font" preference, start with one of the following combinations that have been shown to work:
    Monospaced, Courier, or Consolas plain, 8 point
This should give you a crisp display with a correctly drawn cursor in the Editor and Command Window.  You will know you have a working combination when the cursor placement is correct when typing a long line in the Command Window. There may be other fonts and font sizes that work; you can continue to experiment until you find a setting that works well for you.  Note that other windows that accept text input may continue to draw the cursor at an incorrect location. This will be most noticeable when a line of text grows in length, beyond 40 characters or so.
Further Background Information:
R2013a and previous releases of MATLAB for Mac used Java that comes bundled with OS X; however, starting with MATLAB R2013b, MathWorks migrated to Oracle's Java 7 instead of the one bundled with OS X. This is to ensure the continued availability of MATLAB on Mac computers because Apple is in the process of deprecating its Java support.
R2013b is bundled with Java 7u11. This version lacks Retina display support as described in the following webpage.
A subsequent update with support for Retina displays, Java 7u40, was released in September 2013. Unfortunately, this update contains incomplete support for Retina displays—while visually attractive, the cursor insertion pointer is drawn at an incorrect location with many font sizes.
This behavior is described on the following webpage:
It is hard to know exactly where the cursor is, making editing text significantly more difficult.  We now understand that choosing specific fonts and font sizes can mitigate the issue.  All text editing fields can be impacted to some degree, but it is most noticeable and bothersome in the Editor and Command Window.
on Windows

Sign in to comment.

More Answers (8)

florian on 3 Apr 2014
Edited: MathWorks Support Team on 17 May 2021
Mac only
Inspired by this post here I created the following AppleScript to run Matlab2014a
do shell script "export MATLAB_JAVA=\"/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home\"" & ";/Applications/ -desktop &> /dev/null &"
This should remove the blur on retina Macs. You can also download the script from attachment and drag it to your dock.
the download is huge because of the Matlab Icon
Matthew Gunn
Matthew Gunn on 12 May 2014
Great answers by Florian, Dongeun Lee, and others.
An alternative to export MATLAB_USE_USERWORK=1 is to simply change directory to your regular Matlab userpath before invoking matlab. This may be a small advantage if you invoke matlab from the terminal on occasion and want it to start in the shell's working directory when you do that.
do shell script "cd ~/Documents/MATLAB; export MATLAB_JAVA=\"/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home\";/Applications/ -desktop &> /dev/null &"

Sign in to comment.

David Malling
David Malling on 23 Mar 2014
I had success with fixing the blurriness with the following:
  1. In the Finder, select the Matlab application
  2. From the File menu, select Get Info
  3. Expand the General section, and check Open in Low Resolution
  4. Close the Info window
  5. Open Matlab
I did not do any manual changes to the Matlab Java settings.
Jason Hu
Jason Hu on 19 Nov 2014
Tanks for your post. It works for my r2014a student version. I'm a programming starter and other methods seem too complicated for me.

Sign in to comment.

Andrew Janke
Andrew Janke on 4 Oct 2014
This is fixed in R2014b after all! They got the JVM upgraded to 1.7.0_55 between the prerelease and final release version, and the retina blurriness is fixed now. You can upgrade to R2014b to get the fix.

Dongeun Lee
Dongeun Lee on 17 May 2014
Edited: MathWorks Support Team on 17 Feb 2021
For those who use R2014a and downloaded new Java runtime to resolve the blurry screen issue.
You may get crisp screen; but calling help browser (either from the menu or typing 'doc') will result in MATLAB hang. So you have to quit the MATLAB via 'command+option+ESC.'
Since I often use the help browser, I contacted MathWorks support team. And after lots of e-mails going back and forth, I finally settled with the following solution.
(Note that this applies to R2014a users. I am using MacBook Pro Retina 15-inch Late 2013)
1. Refer to this link and apply the patch as explained. (During the unzip, you should overwrite existing files when prompted.)
2. After the patch, try typing 'doc' on 'crisp' MATLAB. If MATLAB does not hang, you are lucky.
3. If MATLAB hangs, open up 'Terminal' app and do the following:
cd ~
rm -r .matlab
(These commands delete MATLAB configuration directory hidden in your home directory.)
4. If you launch MATLAB again, new '.matlab' will be generated automatically. Now type 'doc' on MATLAB command line and you will see the Help Browser without causing MATLAB hang.
This is it. But there's still an issue: do not maximize the help browser by pressing green + button on the top-left. You can manually adjust the size of the help browser but maximizing the window will again cause MATLAB hang. In this case you can go back to the Step 3 and the problem will be fixed.
I just reported this new issue to MathWorks support team and if I get a final solution, I'll probably post that here. But in the meantime, we can at least use the help browser.
Daniel on 26 Aug 2014
edit: I was using Java 8, not 7, as was clearly stated being a requirement in the top accepted post. Now working, with Java 7u67. Now Eclipse is complaining about Java's version, but at least Matlab is mex'ing for me, and text looks awesome.
Old: I have attempted this fix three times now, and can't figure out why it still doesn't work for me. I really like 2014a in retina rendered mode, but doc calls freeze matlab hard, despite patching and deleting the .matlab folder. What I have done:
  1. fresh download and install of 2014a
  2. fresh download and install of patch 870843
  3. open matlab in crisp mode, try doc, freezes, force quit
  4. rm -r ~/.matlab (which blows away my previous preferences :( )
  5. reopen in crisp mode, try doc, freezes
  6. ?, complain, post this.
  7. fix: uninstall java 8, install java 7u67.OSX 10.9.4, Mid 2012 Retina 15" MBPr

Sign in to comment.

Cong on 18 Nov 2014
Edited: MathWorks Support Team on 17 May 2021
The simplest why to solve this problem is here: Of course you need to understand Chinese.
In one word, download the latest version of JAVA, and replace all files in /Applications/ with all files in /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/. It may depend on the exact direction of your application.
Christoph on 4 Mar 2015
It seems that the JRE upgrade only resolves the issue with desktop elements, but not with the graphics system (figures). I recommend to get in touch with MathWorks technical support about this.

Sign in to comment.

florian on 11 May 2014
Edited: florian on 11 May 2014
@Bob thank you for reporting the website issue I fixed it
@Matthew glad it works, I am happy I can finally give something back to the community
@Dongeun Lee thank you for adding this, I added it to the code on my website
Best, florian

Andrew Janke
Andrew Janke on 16 Aug 2014
FYI, this is still broken in R2014b as of the R2014b Prerelease. It's still using the same Java 1.7.0_11 JVM that has the retina display issues.


No tags entered yet.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!