필터 지우기
필터 지우기

how to put an scale for arrow size in quiver plot for wind vector over map?

조회 수: 7 (최근 30일)
Mansi Gupta
Mansi Gupta 2023년 7월 18일
답변: KSSV 2023년 7월 18일
I have plotted wind vector over chlorophyll-a map using quiver, I do not want to put z scale or colorbar to the arrows as it would interfere with the chlorophyll colors. But I want to put a small box with size to wind speed reference for the black arrows as all arrow size is not same. Can anyone please help with how it can be done in matlab.
Thanks in advance!

답변 (1개)

KSSV
KSSV 2023년 7월 18일
[X,Y,Z] = peaks(50) ;
[u,v] = gradient(Z) ;
w = sqrt(u.^2+v.^2) ;
figure
hold on
h1 = pcolor(X,Y,w) ;
h2 = quiver(X,Y,u,v,'k') ;
axis tight
legend(h2,'Arrows')

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by