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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With