Quiver always come on top !!!!
3 views (last 30 days)
Hi guys; a very fast question. I'm plotting some velocity fields (magnitude), and i want to ovelerlapp the velocity vector on top of it. Since i'm dealing with a river, i'm interested on representing the river banks, and in order to produce a nice a smooth image, i want to "cover" the parts of the grid where the quiver is NaN (land). Imagine the situation:
somehow the quiver is plotted on top of everything !!!! This way i can't hide the NaN with the Cover file (a patch of the bank file).
Does anyone ever encounter this problem??
AJ von Alt on 21 Jan 2014
You can fiddle with the z values of the patch to change whether it appears on top. Z values larger than 1 will usually make the patch appear in front of quiver and values less than 1 will make the patch appear behind quiver.
[x,y] = meshgrid(0:0.2:2,0:0.2:2);
u = cos(x).*y;
v = sin(x).*y;
patch([0;2;0] , [0;2.5;2.5],[0;0;0],'r')
title('Quiver over patch');
patch([0;2;0] , [0;2.5;2.5],'r')
title('Patch over quiver')