<< plot3 | Graphics functions | refresh >> |
quiver(X, Y, U, V) |
quiver(U, V) |
quiver(..., LineSpec) |
quiver(..., propertyName, propertyValue) |
quiver(parent, ...) |
gr = quiver(...) |
x-coordinates of bases of arrows: scalar, vector or matrix.
y-coordinates of bases of arrows: scalar, vector or matrix.
x-components: scalar, vector or matrix.
y-components: scalar, vector or matrix.
Line style, marker and/or color: character vector or scalar string.
a scalar graphics object value: parent container, specified as a axes.
a scalar string or row vector character.
a value.
group of graphics object: arrows.
quiver(X, Y, U, V) plots velocity vectors as arrows with components (U,V) at the point (X, Y).
quiver try to scale the arrow lengths so that they do not overlap.
Current implementation is slow but it can be optimized using DrawLater property of figure. It could be optimized in an next version by an builtin.
f = figure();
f.DrawLater = 'on';
[X, Y] = meshgrid(0:pi/8:pi, -pi:pi/8:pi);
U1 = sin(X);
V1 = cos(Y);
quiver(U1,V1, 'r')
f.DrawLater = 'off';
f = figure();
f.DrawLater = 'on';
[X, Y] = meshgrid(0:pi/8:pi, -pi:pi/8:pi);
U1 = sin(X);
V1 = cos(Y);
U2 = sin(Y);
V2 = cos(X);
ax1 = subplot(1, 2, 1);
axis equal
title(ax1, 'Left Plot')
quiver(ax1, X, Y, U1, V1)
ax2 = subplot(1, 2, 2);
quiver(X,Y,U2,V2)
axis equal
title(ax2, 'Right Plot')
f.DrawLater = 'off';
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET