Wednesday, August 10, 2011

How to fix MATLAB small figures and small fonts in Ubuntu linux

If you are using Ubuntu Linux 10.10 or a similar linux distribution but are seeing small figures (with tiny datapoints on plots) and small fonts on the axis, it is most likely due to the dpi setting being incorrect using the nvidia drivers.

Example of the problem:
MATLAB R2011a on Ubuntu 10.10 with tiny fonts and data points
In order to set your display DPI setting, you will need to add the following lines to your xorg.conf file in the "Device" section:


Option "UseEdidDpi"   "false"
Option "Dpi"          "92 x 92"

If you are new to linux, you can accomplish this with the following procedure:

  • Launch a terminal window by going to Applications -> Accessories -> Terminal
  • type this and press Enter: sudo gedit /etc/X11/xorg.conf
  • add the above 2 lines in the "Device" section in the file
  • Save, restart your computer

Hope this helps!

Here is a decent MATLAB figure after the change:

1 comment: