MATLAB Function Reference
  Go to function:
    Search    Help Desk 
quiver    Examples   See Also

Quiver or velocity plot

Syntax

Description

A quiver plot displays vectors with components (u,v) at the points (x,y).

quiver(U,V) draws vectors specified by U and V at the coordinates defined by x = 1:n and y = 1:m, where [m,n] = size(U) = size(V). This syntax plots U and V over a geometrically rectangular grid. quiver automatically scales the vectors based on the distance between them to prevent them from overlapping.

quiver(X,Y,U,V) draws vectors at each pair of elements in X and Y. If X and Y are vectors, length(X) = n and length(Y) = m, where [m,n] = size(U) = size(V). The vector X corresponds to the columns of U and V, and vector Y corresponds to the rows of U and V.

quiver(...,scale) automatically scales the vectors to prevent them from overlapping, then multiplies them by scale. scale = 2 doubles their relative length and scale = 0.5 halves them. Use scale = 0 to plot the velocity vectors without the automatic scaling.

quiver(...,LineSpec) specifies line style, marker symbol, and color using any valid LineSpec. quiver draws the markers at the origin of the vectors.

quiver(...,LineSpec,'filled') fills markers specified by LineSpec.

h = quiver(...) returns a vector of Line handles.

Remarks

If X and Y are vectors, this function behaves as

Examples

Plot the gradient field of the function:

See Also

contour, LineSpec, plot, quiver3



[ Previous | Help Desk | Next ]