You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/figure_factory/_quiver.py
+40-44Lines changed: 40 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -11,88 +11,84 @@ def create_quiver(
11
11
"""
12
12
Returns data for a quiver plot.
13
13
14
-
:param (list|ndarray) x: x coordinates of the arrow locations
15
-
:param (list|ndarray) y: y coordinates of the arrow locations
16
-
:param (list|ndarray) u: x components of the arrow vectors
17
-
:param (list|ndarray) v: y components of the arrow vectors
18
-
:param (float in [0,1]) scale: scales size of the arrows(ideally to
19
-
avoid overlap). Default = .1
20
-
:param (float in [0,1]) arrow_scale: value multiplied to length of barb
21
-
to get length of arrowhead. Default = .3
22
-
:param (angle in radians) angle: angle of arrowhead. Default = pi/9
23
-
:param (positive float) scaleratio: the ratio between the scale of the y-axis
24
-
and the scale of the x-axis (scale_y / scale_x). Default = None, the
25
-
scale ratio is not fixed.
26
-
:param kwargs: kwargs passed through plotly.graph_objs.Scatter
27
-
for more information on valid kwargs call
28
-
help(plotly.graph_objs.Scatter)
29
-
30
-
:rtype (dict): returns a representation of quiver figure.
31
-
14
+
Parameters
15
+
----------
16
+
x : list or ndarray
17
+
x coordinates of the arrow locations.
18
+
y : list or ndarray
19
+
y coordinates of the arrow locations.
20
+
u : list or ndarray
21
+
x components of the arrow vectors.
22
+
v : list or ndarray
23
+
y components of the arrow vectors.
24
+
scale : float
25
+
Scales size of the arrows (ideally to avoid overlap). Must be in the range [0, 1]. Default is 0.1.
26
+
arrow_scale : float
27
+
Value multiplied to length of barb to get length of arrowhead. Must be in the range [0, 1]. Default is 0.3.
28
+
angle : float
29
+
Angle of arrowhead in radians. Default is pi/9.
30
+
scaleratio : float
31
+
The ratio between the scale of the y-axis and the scale of the x-axis (scale_y / scale_x). Must be a positive float. Default is None, meaning the scale ratio is not fixed.
32
+
**kwargs
33
+
Additional keyword arguments passed through to `plotly.graph_objs.Scatter`. For more information on valid kwargs, call `help(plotly.graph_objs.Scatter)`.
34
+
35
+
Returns
36
+
-------
37
+
dict
38
+
A representation of the quiver figure.
39
+
40
+
Examples
41
+
--------
32
42
Example 1: Trivial Quiver
33
43
34
44
>>> from plotly.figure_factory import create_quiver
0 commit comments