필터 지우기
필터 지우기

How to draw the both sided arrow lines.

조회 수: 81 (최근 30일)
Smithy
Smithy 2022년 12월 15일
댓글: Smithy 2022년 12월 15일
Hello everybody,
I would like to draw a line with both sided arrow. And I tried with quiver function.
I can make the one sided arrow head with this function. I checked matlab document and example,
but I did not find the way how to draw the both sided arrow lines.
plot([0 0],[0 10],'k'); hold on;
plot([10 10],[0 10],'k');
quiver(0, 0, 10, 0, 'off', 'k'); % scale 'off'
axis([-10 20 -10 20])

채택된 답변

Walter Roberson
Walter Roberson 2022년 12월 15일
annotation('doublearrow', x, y)
Be careful! The default units are 'normalized' (to the figure), and there is no way to select 'data' units. This means that you cannot draw an annotation in an axes, you can only draw an annotation that happens to align with the axes based on the current axes position... and which will probably get misaligned if you move or resize or zoom or pan the axes.
Because of these faults, you should look in the File Exchange for replacements that at least build the positions based on data coordinates, and which might know how to automatically reposition.
  댓글 수: 1
Smithy
Smithy 2022년 12월 15일
Thank you very much for your kind answer. As your proposal, I found the function of Normalized Coordinates for Annotations in File Exchange. Now it works well. Thank you once more.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by