Quiver Color and Length management

Functions to change aspects of Quiver plots in Matlab. Color, length of vector, length of head and angle of the head can easily be changed.
305.0 次下载
更新时间 2019/7/16

I provide two functions.
SetQuiverColor and SetQuiverLength.
The function SetQuiverColor is heavily based on the answer by Suever found on Stackoverflow forum (https://stackoverflow.com/questions/29632430/quiver3-arrow-color-corresponding-to-magnitude).

The function SetQuiverColor allows to change the color of the quiver vectors according to a given colormap.
The function SetQuiverLength allows to have control of the length of the vectors in units of the x/y/z axis.
In addition, SetQuiverLength can take 2 optional parameters:
1) HeadLength: Which allows to manually set the length of the lines constituting the head.
It should be given in units of xyz axis.
2) HeadAngle: Allows to change the angle of the head.
The angle must be given in degrees. The default angle is ~28^\circ

For some yet unknown reasons, the SetQuiverLength requires a pause towards the end of the code. If not there, the values of the vertices are changed only internally and not graphically!
This means that the pause may be too long/too short for your computer and you may have to adjust it sadly... !
If you know a work around, let me know.

An example is given for each function in the header.

引用格式

De Spiegeleer Alexandre (2024). Quiver Color and Length management (https://github.com/AlexDs20/Quiver), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2018b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Vector Fields 的更多信息

Community Treasure Hunt

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

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.0.1

Added 2 optional inputs for SetQuiverLength allowing to change the length and the angle of the head.

1.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库