function axnote(string)
font_size = get(0, 'DefaultAxesFontSize');
if 1
h1 = text(0.99, 0.05, string, ...
'units', 'normalized', ...
'horizontalalignment', 'right', ...
'verticalalignment','bottom', ...
'backgroundColor','white', ...
'fontsize', font_size ...
);
end
if 0
h1 = text(0.99, 0.95, string, ...
'units', 'normalized', ...
'horizontalalignment', 'right', ...
'verticalalignment','top', ...
'backgroundColor','white', ...
'fontsize', font_size ...
);
end
return
h1 = text(1, 1, string, ...
'units', 'normalized', ...
'horizontalalignment', 'right', ...
'verticalalignment','top', ...
'backgroundColor','white' ...
)
matlab 工具函数 —— axnote(在坐标轴上写文本内容)
最新推荐文章于 2023-03-08 18:58:19 发布