quiverwcolorbar

版本 1.8.0.0 (14.5 KB) 作者: Melissa Day
Generates a quiver plot colored according to vector magnitude and/or user specified axis boundaries.
4.3K 次下载
更新时间 2015/3/6

查看许可证

quiverwcolorbar adds functionality to the original quiver function by assigning color to the arrows according to the vector magnitude. The corresponding colorbar spans the minimum and maximum values of the dataset or can be specified by the user. Any changes to the colorbar boundaries change the vector colors accordingly.
Syntax:
quiverwcolorbar(x,y,u,v,scale,'bounds',[colormin colormax])

Inputs:
x, y: Vector locations
u, v: Vector directions (East-West, North-South)
scale: Scalar value to set vector lengths
'bounds': Optional setting to specify colorbar axis minimum and maximum values

Example:
x = rand(1,50).*100;
y = rand(1,50).*100;
u = rand(1,50) .* 10;
v = rand(1,50) .* 10;
scale = 0;
figure; quiverwcolorbar(x',y',u',v',scale); %compare to:
figure; quiverwcolorbar(x',y',u',v',scale,'bounds',[0 10]);

引用格式

Melissa Day (2024). quiverwcolorbar (https://www.mathworks.com/matlabcentral/fileexchange/40224-quiverwcolorbar), MATLAB Central File Exchange. 检索时间: .

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

参考作品: Quiverc, quiverc2wcmap, vfield_color, quiver2.m v1.2 (Nov 2009)

启发作品: quivermc

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.8.0.0

Fixed so scale can be used to change arrow size

1.7.0.0

Minor typo fixes

1.5.0.0

Fixed some typos, added bit in case min(xyuvvrNNs) < colormin

1.3.0.0

changed spacing in description

1.2.0.0

Fixed some typos, added bit in case min(xyuvvrNNs) < colormin

1.1.0.0

n/a

1.0.0.0