What's wrong with this textbox annotation?
17 次查看(过去 30 天)
显示 更早的评论
I'd like to create a textbox annotation in a figure called "figure1", but it always gives me an error saying that there are too many input arguments for "annotation". Here's what I do:
annotation(figure1,'textbox',[0.2726 0.638 0.1111 0.05249],...
'String',{'Slope = Hp'},...
'HorizontalAlignment','center',...
'FontSize',14,...
'FitBoxToText','off');
What's wrong with this?
1 个评论
采纳的回答
Image Analyst
2013-7-13
It worked for me. You did do this before you called it, didn't you:
figure1 = figure;
3 个评论
Image Analyst
2013-7-13
编辑:Image Analyst
2013-7-13
Run this:
figure1 = figure;
annotation(figure1,'textbox',[0.2726 0.638 0.1111 0.05249],...
'String',{'Slope = Hp'},...
'HorizontalAlignment','center',...
'FontSize',14,...
'FitBoxToText','off');
It gives no errors or warnings whatsoever. Is it possible you redefined annotation() with your own function? What does this say:
>> which -all annotation
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!