quiver arrows in color representing another variable?

Hi
Is it possible to incorporate a second variable into the quiver code? Could the color arrows in quiver be used to represent another variable, such as temperature or humidity ? This would work similarly to the scatter code, where the arrows indicate both the direction and magnitude of the wind but in color another variable?.
Thanks

3 件のコメント

Dyuman Joshi
Dyuman Joshi 2023 年 8 月 21 日
The above plot looks more like a feather plot of complex values. (You can change the color of individual arrows in feather.)
It would be better if you can attach your data, so suggestions can be made according to it.
Claudio Iturra
Claudio Iturra 2023 年 8 月 21 日
編集済み: Claudio Iturra 2023 年 8 月 22 日
hi, is just a quiver with the ShowArrowHead option off.
quiver(x,y,u,v,0.1,'b','ShowArrowHead','off');
Look, thi is the ugly version, making a hold on of the quiver with the scatter...
quiver(x,y,u,v,0.1,'b','ShowArrowHead','off');
hold on
scatter(x,y,10,temp,'filled');
Dyuman Joshi
Dyuman Joshi 2023 年 8 月 22 日
It's not possible with quiver, as @Walter Roberson mentions below.
You could try getting a similar plot via feather() instead of quiver().

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2023 年 8 月 21 日

0 投票

Not by using quiver(). quiver() creates a quivergroup(), which internally contains two LineStrip objects. The LineStrip objects have a CData property that appears to only accept a single color.

カテゴリ

ヘルプ センター および File ExchangeVector Fields についてさらに検索

製品

リリース

R2022b

タグ

質問済み:

2023 年 8 月 21 日

コメント済み:

2023 年 8 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by