ARROWS: generalized and vectorized 2-D arrows plot

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 (https://www.mathworks.com/matlabcentral/fileexchange/37371-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!
版本 已发布 发行说明
1.3.0.1

fix an issue with loop direction

1.3.0.0

improves loop arrows

1.2.0.1

update image

1.2.0.0

new option to make loop arrows

1.1.0.0

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

1.0.0.0