compass
(Not recommended) Arrows emanating from origin
compass
is not recommended. Use compassplot
instead. (since R2024b)
For more information on updating your code, see Version History.
Description
compass(
plots
arrows originating from the point (0, 0). Specify the direction of arrows using the
Cartesian coordinates U
,V
)U
and V
, with
U
indicating the x-coordinates and
V
indicating the y-coordinates. The number of
arrows matches the number of elements in U
.
The compass
function plots arrows on a circular grid with
theta-axis and r-axis tick labels within an
Axes
object. Therefore, the coordinates you specify do not match the
labels displayed on the plot.
compass(
plots arrows using the real and
imaginary parts of the complex values specified by Z
)Z
, with the real
part indicating the x-coordinates and the imaginary part indicating
the y-coordinates. This syntax is equivalent to
compass(real(Z),imag(Z))
.
compass(___,
sets the
line style, marker symbol, and color for the arrows.LineSpec
)
compass(
plots arrows in
the specified axes instead of the current axes.ax
,___)
c = compass(___)
returns a vector of
Line
objects. This syntax is useful for controlling the appearance of
arrows.