compass
- : compass
(u, v)¶ - : compass
(z)¶ - : compass
(…, linespec)¶ - : compass
(ax, …)¶ - :
h =compass(…)¶ Draw arrows from the origin on a polar grid.
The arrow k ends at (u(k), v(k)); a complex array z gives the end points
real (z)andimag (z). Matrix input is flattened. Every arrow is a single line object (shaft followed by the arrow head); the result is the column vector of these handles. Arrows with NaN components are created but draw nothing.The grid is the polar grid MATLAB draws: concentric rings every "nice" step out to an outer ring of radius 1, 1.5, 2, 2.5, 3, 4, 5, 6, 8 or 10 times a power of ten that encloses the longest arrow, six spokes through the origin, a ring of angle labels (0 to 330 degrees in steps of 30) and the radius of each ring written beside it. All arrows have the first colour of the axes ColorOrder unless linespec says otherwise.