I am trying to plot some arrows with quiver on matlab to represent the flow over a contour but when I run this code, the arrows are only drawn over the left part of the contour, would anyone have an idea of what causes this problem?
Code:
ygrid1=ygrid(1:6:end);
zgrid1=zgrid([1:1:3 4:3:54]);
v1=zeros(size(ygrid1,2),size(zgrid1,2));
w1=zeros(size(ygrid1,2),size(zgrid1,2));
for j=1:1:43
for k=1:1:3
v1(j,k)=V(6*j-5,k);
w1(j,k)=W(6*j-5,k);
end
for k=4:1:20
v1(j,k)=V(6*j-5,3*k-8);
w1(j,k)=W(6*j-5,3*k-8);
end
end
f2=figure;
[c,h]=contourf(ygrid*1480,5*zgrid,50*V',30); %if lat:1480*ygrid*180/(6371*pi)
%utranspose=u'
colorbar
set(h,'LineStyle','none') %black contours of the iso-zones
cmin=min(min(50*V'));
cmax=max(max(50*V'));
if cmin==cmax
colormap(f2,b2r(cmin-1,cmax+1));
else
colormap(f2,b2r(cmin,cmax));
end
%b2r: from blue to red with white set to 0
title(' Mean v (ms^{-1})');
ylabel('Height (km)');
xlabel('Distance from y0 (km)')
hold on
quiver(1495*ygrid1,5*zgrid1,50*v1',0.17*w1','k','autoScaleFactor',0.1)
hold off