Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Unable to change appearance of plots in R2012b Linux

Subject: Unable to change appearance of plots in R2012b Linux

From: Gabriel Rosser

Date: 13 Feb, 2013 18:43:09

Message: 1 of 7

Hi all,

I've just installed Matlab R2012b on a fresh install of Ubuntu 64 bit. Plots look extremely ugly and when I change properties, the effect is not shown in the plot window. MWE:

plot(rand(1,10))
h2=xlabel('my x label')
set(h2,'FontSize',14,'FontName','helvetica')
set(gca,'FontSize',24,'FontName','helvetica')

The changes to the font size and type are not rendered in the window. Exporting as a png saves the figure with the ugly default font size and type. Exporting as an EPS saves the figure as it should look, with correct font sizes.

Changing the figure renderer makes no difference to the appearance.

When I use the plot tools to edit the xlabel, the font size shows correctly, but only when I'm editing. Once I click away from it, the font reappears in the default font type and size. This has been reported elsewhere in the forum, but was attributed to a problem with NXClient, which I am not using:

http://www.mathworks.co.uk/matlabcentral/newsreader/view_thread/300053

Also, using the tex interpreter on axis labels doesn't work until i export as EPS - none of the tex output shows up on the figure.

Other possibly relevant information: I use a dual screen setup, so I get the Matlab Java errors related to this problem, reported here:

http://www.mathworks.co.uk/matlabcentral/newsreader/view_thread/169024

but again, I'm not convinced that's the root of the problem, because I don't get those errors unless I open the plot tools (which isn't something I ever use).

I'd really appreciate any comments or suggestions as this makes Matlab essentially unusable for me. Thanks for your help!

Subject: Unable to change appearance of plots in R2012b Linux

From: Gabriel Rosser

Date: 18 Feb, 2013 12:27:06

Message: 2 of 7

*bump*

Any thoughts please guys? Or any tests I could run to provide more info?

A fresh install of a brand new version of Matlab + a fresh install of one of the most popular Linux distributions shouldn't contain a crippling bug of this type!

Thanks for your help.

Subject: Unable to change appearance of plots in R2012b Linux

From: Steven_Lord

Date: 19 Feb, 2013 15:14:11

Message: 3 of 7



"Gabriel Rosser" <gabriel.rosser@physics.ox.ac.uk> wrote in message
news:kft6mq$1mq$1@newscl01ah.mathworks.com...
> *bump*
>
> Any thoughts please guys? Or any tests I could run to provide more info?
>
> A fresh install of a brand new version of Matlab + a fresh install of one
> of the most popular Linux distributions shouldn't contain a crippling bug
> of this type!

Diagnosing what's going on will be difficult to do via the newsgroup. Please
contact Technical Support and work with them to determine the cause of this
issue.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: Unable to change appearance of plots in R2012b Linux

From: Gabriel Rosser

Date: 25 Feb, 2013 09:54:10

Message: 4 of 7

Thanks for the suggestion Steve, I did contact tech support.

The fix: install packages xfonts-100dpi and xfonts-75dpi.

The problem: Ubuntu 12.04 (possibly others too) doesn't come with the default Matlab font installed. This messes up the appearance of plots.

Related thread: http://ubuntuforums.org/showthread.php?t=1762805

Thanks all.

"Steven_Lord" <slord@mathworks.com> wrote in message <kg04s3$6qi$1@newscl01ah.mathworks.com>...
>
>
> "Gabriel Rosser" <gabriel.rosser@physics.ox.ac.uk> wrote in message
> news:kft6mq$1mq$1@newscl01ah.mathworks.com...
> > *bump*
> >
> > Any thoughts please guys? Or any tests I could run to provide more info?
> >
> > A fresh install of a brand new version of Matlab + a fresh install of one
> > of the most popular Linux distributions shouldn't contain a crippling bug
> > of this type!
>
> Diagnosing what's going on will be difficult to do via the newsgroup. Please
> contact Technical Support and work with them to determine the cause of this
> issue.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Subject: Unable to change appearance of plots in R2012b Linux

From: Monique

Date: 25 Jun, 2013 23:00:15

Message: 5 of 7

Hello,

Turns out this "fix" doesn't totally solve the problem. The fonts are very low resolution, this is only visible when zooming in but is a real issue for publication-type plots. See http://ubuntuforums.org/showthread.php?t=2157550
Did you notice the same issue? Found a way to fix it?

Thanks...

Monique


"Gabriel Rosser" <gabriel.rosser@physics.ox.ac.uk> wrote in message <kgfcc2$jev$1@newscl01ah.mathworks.com>...
> Thanks for the suggestion Steve, I did contact tech support.
>
> The fix: install packages xfonts-100dpi and xfonts-75dpi.
>
> The problem: Ubuntu 12.04 (possibly others too) doesn't come with the default Matlab font installed. This messes up the appearance of plots.
>
> Related thread: http://ubuntuforums.org/showthread.php?t=1762805
>
> Thanks all.
>

Subject: Unable to change appearance of plots in R2012b Linux

From: Thomas Clerc

Date: 4 Jul, 2013 08:30:15

Message: 6 of 7


Hi all,

I noticed exactly the same problem as Monique (see previous post). Installing the packages xfonts-100dpi and xfonts-75dpi does indeed enable the change of font size. But it turned out to become very pixelated as the fonts get bigger.

I did not find any way to solve this.

Note: I have matlab 2013a on Ubuntu 12.04.


> Turns out this "fix" doesn't totally solve the problem. The fonts are very low resolution, this is only visible when zooming in but is a real issue for publication-type plots. See http://ubuntuforums.org/showthread.php?t=2157550
> Did you notice the same issue? Found a way to fix it?
>
> Thanks...
>
> Monique

Subject: Unable to change appearance of plots in R2012b Linux

From: Dirk

Date: 9 Aug, 2013 18:49:11

Message: 7 of 7

Same problem here: installation of xfonts-100dpi and xfonts-75dpi enables setting font properties in Matlab, but the resulting fonts are too low for publication purposes...or much else.

I have a new installation of Ubuntu 12.04 LTS running Matlab R2013a (8.1.0.604).
 
Querying font packages:
$ dpkg --get-selections |grep font
font-manager install
fontconfig install
fontconfig-config install
fonts-kacst install
fonts-kacst-one install
fonts-khmeros-core install
fonts-lao install
fonts-liberation install
fonts-nanum install
fonts-opensymbol install
fonts-takao-pgothic install
fonts-thai-tlwg install
fonts-tlwg-garuda install
fonts-tlwg-kinnari install
fonts-tlwg-loma install
fonts-tlwg-mono install
fonts-tlwg-norasi install
fonts-tlwg-purisa install
fonts-tlwg-sawasdee install
fonts-tlwg-typewriter install
fonts-tlwg-typist install
fonts-tlwg-typo install
fonts-tlwg-umpush install
fonts-tlwg-waree install
gnome-font-viewer install
gsfonts install
libfont-afm-perl install
libfontconfig1 install
libfontconfig1:i386 install
libfontenc1 install
libxfont1 install
ttf-freefont install
ttf-indic-fonts-core install
ttf-punjabi-fonts install
ttf-ubuntu-font-family install
xfonts-100dpi install
xfonts-75dpi install
xfonts-base install
xfonts-encodings install
xfonts-mathml install
xfonts-scalable install
xfonts-utils install

Querying font paths:
$ xset q
Font Path:
  /usr/share/fonts/X11/misc,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us