ARROWS: generalized and vectorized 2-D arrows plot

버전 (3.87 KB) 작성자: François Beauducel
Vectorized and flexible arrow plot function in 2-D
다운로드 수: 2.1K
업데이트 날짜: 2020/6/23

라이선스 보기

This little function is an alternative to other existing arrow plot functions, since it has very simple, vectorized and effective coding. In fact, arrows are all plotted with a single patch command! The function also accepts any standard patch parameter/value pair like 'FaceColor', 'EdgeColor', 'LineWidth', etc.

It can be used to plot a personalized arrow at coordinates X,Y with length L and azimuth AZ, or any of these arguments can be vector or matrix, like QUIVER did, to plot multiple arrows. The option 'Cartesian' allows defining U and V components instead of polar L and AZ.

Arrow's aspect ratio, head and segment line shapes are configurable with 4 parameters: head width, head length, head inside length and segment line width, all normalized to arrow's length. See the upper part of examples figure.

It is also possible to vary only the arrow length with fixed head and line width, using a reference length. The examples figure shows the effect of this option: upper arrows use a reference length, while lower arrows do not.

인용 양식

François Beauducel (2024). ARROWS: generalized and vectorized 2-D arrows plot (, MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2006a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
Help CenterMATLAB Answers에서 Vector Fields에 대해 자세히 알아보기
태그 태그 추가

줌: draw

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보

fix an issue with loop direction

improves loop arrows

update image

new option to make loop arrows

New options:
- 'Cartesian': define (U,V) instead of (L,AZ)
- 'Ref', REFLENGTH : fixes head and width relative to a reference length