1. 添加副标题
多行标题已经支持了很长一段时间,但是从rb开始,您可以用两种简单的方法将具有自己独立属性的副标题添加到绘图中。
- Use the new subtitle function: >> s=subtitle(mySubtitle)- Use the new second argument to the title function: >> [t,s]=title(myTitle,mySubtitle)
figure()tiledlayout(2,2)% Method 1ax(1) = nexttile;th(1) = title(Pupil size); sh(1) = subtitle(Happy faces);ax(2) = nexttile;th(2) = title(Pupil size); sh(2) = subtitle(Sad faces);% Method 2ax(3) = nexttile;[th(3), sh(3)] = title(Fixation duration, Happy faces); ax(4) = nexttile;[th(4), sh(4)] = title(Fixation duration, Sad faces); set(ax, xticklabel, [], yt