更改两行图标题中的字体

Mus*_*shi 7 matlab line title

我想以两行的方式编写我的图形标题,我可以分别更改两行的文本属性.我发现:

title(['\bf{first line}' char(10) '\rm{second line}'])
Run Code Online (Sandbox Code Playgroud)

这使第一行变粗.但是如何更改第一行的字体大小?

Dan*_*Dan 9

 title(['\fontsize{20pt}\bf{first line}' char(10) '\fontsize{10pt}\rm{second line}'])
Run Code Online (Sandbox Code Playgroud)

我发现这个语法隐藏在文档中:http://www.mathworks.com/help/matlab/creating_plots/adding-text-annotations-to-graphs.html#f0-19466 然后摆弄它.


Rod*_*uis 6

我和Dan在一起,但是我会忽略不直观的char(10)并使用垂直连接的单元阵列:

title({...
    '\fontsize{25pt}\bf{first line}' 
    '\fontsize{8pt}\rm{second line}'
})
Run Code Online (Sandbox Code Playgroud)

结果:

在此输入图像描述

没有什么新东西,只是一个但更直观和可读性.