I am making a quiver plot :
[x,y] = meshgrid(0:0.2:2,0:0.2:2);
u = cos(x).*y;
v = sin(x).*y;
figure
quiver(x,y,u,v)
I want the arrow heads to be filled (i.e and not )
From the documentation, it should be pretty straightforward by using
quiver(...,LineSpec,'filled')
However, I still couldn't figure out the right syntax - these do not work :
quiver(x,y,u,v,'LineWidth','filled');
quiver(x,y,u,v,'LineWidth',1,'filled');
Thanks for your help!
edit : Using line specifiers does the following:
quiver(x,y,u,v) %Original
quiver(x,y,u,v,'-sk','filled') %With line specifiers
'-k'
for a black line, and'filled'
refers to the point markers which can be specified. For example'-sk'
which gives squares however these will replace the arrows heads from quiver. To modify the quivers I suggest you take a look at this previous question.quiver(x,y,u,v,'-sk')
the 'linestyle' is not needed. I'm afraid I don't know of a simpler way... (its worth comparing withquiver(x,y,u,v,'-sk','filled')
to see the effect of filled)annotation('arrow',...)
. A possible approach would be to replace every arrow head line object with a polygon usingfill(...)
.