¿How to change title of plot while using quoted text, variables, multilines and Fontsize?

1 次查看(过去 30 天)
I can make it work separetly but not on the same title. This is what I have now and it's working.
title ([ suj '.' iniciales_cell(suj) 'Grupo' grupo],'fontsize',17);
But now I want to put what's in bold in the first line and what's in italic on the second line.
suj '.' iniciales_cell(suj) Line 1
'Grupo' grupo Line 2
How can I do this?? I tried with {} but i can't make it work with the fontsize and all.
Thanks in advance

采纳的回答

dpb
dpb 2017-6-1
编辑:dpb 2017-6-2
hTl=title({'\bfLine 1';'\rmLine 2'},'fontsize',17);
Addendum Missed the 'quoted' string--you just have to "double-up" to embed a single quote in a quoted string:
hTl=title({'\bf''Line 1''';'\rm''Line 2'''},'fontsize',17);
  4 个评论
dpb
dpb 2017-6-6
Glad to help...it's easy to get lost in the forest of tick marks in stuff like this and what is really pretty simple just gets messy enough it's hard to figure out where went wrong.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Labels and Annotations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by