필터 지우기
필터 지우기

quiver arrows in color representing another variable?

조회 수: 20 (최근 30일)
Claudio Iturra
Claudio Iturra 2023년 8월 21일
댓글: Dyuman Joshi 2023년 8월 22일
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
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일
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.

카테고리

Help CenterFile Exchange에서 Vector Fields에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by