matlab常用的字体注释函数为text()和annotation()
位置,内容,大小,颜色,对齐,字体,字号。
请参考以下matlab代码:
% ==================================
t = 0:100;
plot(t,sin(0.5*t)) % 画出任意图形,待标注
h = text(20,0,'Nexus');% 输出文字在坐标(20,0)
set(h,'FontWeight','bold','FontSize',60)% 设置加粗字体,字号60
set(h,'FontName','Arial Rounded MT Bold');% 设置字体
set(h,'FontAngle','italic');% 设置斜字体
set(h, 'Color','r');% 设置字体颜色
% ==================================
用法如下:
annotation('textbox',[x y w h])
输出结果为: