What's wrong with this textbox annotation?
6 ビュー (過去 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 件のコメント
per isakson
2013 年 7 月 13 日
編集済み: per isakson
2013 年 7 月 13 日
Which Matlab release? It works here with R2012a.
採用された回答
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 で Specifying Target for Graphics Output についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!