'LineStyle','none'
didn't work because the style applies both to the stem and to the head, so setting it to none
hides both.
This can be solved by digging around some undocumented properties of the Quiver
object. Exploring the properties of a Quiver
object (using struct(<handle to quiver plot>)
) we can see that a quiver plot has NodeChildren
property, and that it is made of 4 elements,
>> hq = quiver(x,y,u,v);
>> hq.NodeChildren
ans =
4×1 graphics array:
ListOfPointsHighlight
LineStrip
LineStrip
Marker
The LineStrip
objects you see above, correspond, from top to bottom, to tails and the heads. From here it's just a matter of hiding the tails via their Visible
property:
[x,y] = meshgrid(0:0.2:2,0:0.2:2);
u = cos(x).*y;
v = sin(x).*y;
figure();
hq = quiver(x,y,u,v);
pause(0.1); % this appears to help
hq.NodeChildren(2).Visible = 'off';
Resulting in:
Tested on R2019a.