How can I set automatically the textarrow position on a graph?

6 ビュー (過去 30 日間)
Lorenzo
Lorenzo 2013 年 2 月 20 日
I would like to place the top of the arrow in a text-arrow annotation automatically on a plot, taking as reference a specific point of a line

回答 (2 件)

Oleg Komarov
Oleg Komarov 2013 年 2 月 20 日
編集済み: Oleg Komarov 2013 年 2 月 20 日
It converts data units to normalized units which are required by the annotation() function.
plot(1:10);
% tail
[xt yt] = ds2nfu(3, 6);
% head
[xh yh] = ds2nfu(5, 5);
a = annotation('textarrow', [xt xh],[yt yh], 'String' , 'Straight Line');

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 20 日
編集済み: Azzi Abdelmalek 2013 年 2 月 20 日
annotation('textarrow',[x0,x1],[y0,y1],'String',yourtext);

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by