|
87 | 87 | angles : {'uv', 'xy'} or array-like, default: 'uv'
|
88 | 88 | Method for determining the angle of the arrows.
|
89 | 89 |
|
90 |
| - - 'uv': Arrow direction in screen coordinates. Use this if the arrows |
91 |
| - symbolize a quantity that is not based on *X*, *Y* data coordinates. |
| 90 | + - 'uv': Arrow directions are based on |
| 91 | + :ref:`display coordinates <coordinate-systems>`; i.e. a 45° angle will |
| 92 | + always show up as diagonal on the screen, irrespective of figure or Axes |
| 93 | + aspect ratio or Axes data ranges. This is useful when the arrows represent |
| 94 | + a quantity whose direction is not tied to the x and y data coordinates. |
92 | 95 |
|
93 | 96 | If *U* == *V* the orientation of the arrow on the plot is 45 degrees
|
94 | 97 | counter-clockwise from the horizontal axis (positive to the right).
|
95 | 98 |
|
96 | 99 | - 'xy': Arrow direction in data coordinates, i.e. the arrows point from
|
97 |
| - (x, y) to (x+u, y+v). Use this e.g. for plotting a gradient field. |
| 100 | + (x, y) to (x+u, y+v). This is ideal for vector fields or gradient plots |
| 101 | + where the arrows should directly represent movements or gradients in the |
| 102 | + x and y directions. |
98 | 103 |
|
99 | 104 | - Arbitrary angles may be specified explicitly as an array of values
|
100 | 105 | in degrees, counter-clockwise from the horizontal axis.
|
101 | 106 |
|
102 | 107 | In this case *U*, *V* is only used to determine the length of the
|
103 | 108 | arrows.
|
104 | 109 |
|
| 110 | + For example, ``angles=[30, 60, 90]`` will orient the arrows at 30, 60, and 90 |
| 111 | + degrees respectively, regardless of the *U* and *V* components. |
| 112 | +
|
105 | 113 | Note: inverting a data axis will correspondingly invert the
|
106 | 114 | arrows only with ``angles='xy'``.
|
107 | 115 |
|
|
114 | 122 | scale : float, optional
|
115 | 123 | Scales the length of the arrow inversely.
|
116 | 124 |
|
117 |
| - Number of data units per arrow length unit, e.g., m/s per plot width; a |
118 |
| - smaller scale parameter makes the arrow longer. Default is *None*. |
| 125 | + Number of data units per represented by one unit of arrow length on the plot. |
| 126 | + For example, if the data represents velocity in meters per second (m/s), the |
| 127 | + scale parameter determines how many meters per second correspond to one unit of |
| 128 | + arrow length relative to the width of the plot. |
| 129 | + Smaller scale parameter makes the arrow longer. Default is *None*. |
119 | 130 |
|
120 | 131 | If *None*, a simple autoscaling algorithm is used, based on the average
|
121 | 132 | vector length and the number of vectors. The arrow length unit is given by
|
122 | 133 | the *scale_units* parameter.
|
123 | 134 |
|
124 | 135 | scale_units : {'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'}, optional
|
125 |
| - If the *scale* kwarg is *None*, the arrow length unit. Default is *None*. |
| 136 | + If the *scale* kwarg is *None*, the arrow length unit is automatically chosen based |
| 137 | + on scale_units. Default is *None*. |
126 | 138 |
|
127 | 139 | e.g. *scale_units* is 'inches', *scale* is 2.0, and ``(u, v) = (1, 0)``,
|
128 | 140 | then the vector will be 0.5 inches long.
|
129 | 141 |
|
130 |
| - If *scale_units* is 'width' or 'height', then the vector will be half the |
131 |
| - width/height of the axes. |
| 142 | + If *scale_units* is 'width' or 'height', and *scale* is 2.0, then the vector will |
| 143 | + be half the width/height of the axes. |
132 | 144 |
|
133 |
| - If *scale_units* is 'x' then the vector will be 0.5 x-axis |
| 145 | + If *scale_units* is 'x', and *scale* is 2.0, then the vector will be 0.5 x-axis |
134 | 146 | units. To plot vectors in the x-y plane, with u and v having
|
135 | 147 | the same units as x and y, use
|
136 | 148 | ``angles='xy', scale_units='xy', scale=1``.
|
|
0 commit comments