Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing font in a two line figure title

Tags:

matlab

line

title

I want to write my figure title in two lines in a way that I can change the text properties of both lines separately. I found:

title(['\bf{first line}' char(10) '\rm{second line}'])

which makes the first line bold. But how can I change the font size for first line?

like image 855
Mushi Avatar asked Apr 24 '13 09:04

Mushi


People also ask

How do I change font size in Matlab title?

To change the font units, use the FontUnits property. If you add a title or subtitle to an axes object, then the font size property for the axes also affects the font size for the title and subtitle. The title and subtitle font sizes are the axes font size multiplied by a scale factor.


1 Answers

 title(['\fontsize{20pt}\bf{first line}' char(10) '\fontsize{10pt}\rm{second line}'])

I found this syntax hidden in the docs: http://www.mathworks.com/help/matlab/creating_plots/adding-text-annotations-to-graphs.html#f0-19466 And then fiddled it bit.

like image 161
Dan Avatar answered Oct 11 '22 14:10

Dan