Azzera filtri
Azzera filtri

quiver arrows in color representing another variable?

17 visualizzazioni (ultimi 30 giorni)
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 Commenti
Claudio Iturra
Claudio Iturra il 21 Ago 2023
Modificato: Claudio Iturra il 22 Ago 2023
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 il 22 Ago 2023
It's not possible with quiver, as @Walter Roberson mentions below.
You could try getting a similar plot via feather() instead of quiver().

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 21 Ago 2023
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.

Categorie

Scopri di più su Vector Fields in Help Center e File Exchange

Tag

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by