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

조회 수: 7 (최근 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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by