8
8
9
9
10
10
def create_quiver (x , y , u , v , scale = .1 , arrow_scale = .3 ,
11
- angle = math .pi / 9 , scaleratio = None , ** kwargs ):
11
+ angle = math .pi / 9 , scaleratio = None , ** kwargs ):
12
12
"""
13
13
Returns data for a quiver plot.
14
14
@@ -21,7 +21,7 @@ def create_quiver(x, y, u, v, scale=.1, arrow_scale=.3,
21
21
:param (float in [0,1]) arrow_scale: value multiplied to length of barb
22
22
to get length of arrowhead. Default = .3
23
23
:param (angle in radians) angle: angle of arrowhead. Default = pi/9
24
- :param (positive float) angle : the ratio between the scale of the y-axis
24
+ :param (positive float) scaleratio : the ratio between the scale of the y-axis
25
25
and the scale of the x-axis (scale_y / scale_x). Default = None, the
26
26
scale ratio is not fixed.
27
27
:param kwargs: kwargs passed through plotly.graph_objs.Scatter
@@ -78,7 +78,7 @@ def create_quiver(x, y, u, v, scale=.1, arrow_scale=.3,
78
78
79
79
# Create quiver
80
80
fig = create_quiver(x, y, u, v, scale=.2, arrow_scale=.3, angle=math.pi/6,
81
- name='Wind Velocity', line=Line (width=1))
81
+ name='Wind Velocity', line=dict (width=1))
82
82
83
83
# Add title to layout
84
84
fig['layout'].update(title='Quiver Plot')
@@ -145,7 +145,7 @@ class _Quiver(object):
145
145
Refer to FigureFactory.create_quiver() for docstring
146
146
"""
147
147
def __init__ (self , x , y , u , v ,
148
- scale , arrow_scale , angle , scaleratio = 1 , ** kwargs ):
148
+ scale , arrow_scale , angle , scaleratio = 1 , ** kwargs ):
149
149
try :
150
150
x = utils .flatten (x )
151
151
except exceptions .PlotlyError :
@@ -228,7 +228,7 @@ def get_quiver_arrows(self):
228
228
point1, endpoint, point2 y_values separated by a None to create
229
229
the barb of the arrow.
230
230
"""
231
- dif_x = [i - j for i , j in zip (self .end_x , self .x )]
231
+ dif_x = [i - j for i , j in zip (self .end_x , self .x )]
232
232
dif_y = [i - j for i , j in zip (self .end_y , self .y )]
233
233
234
234
# Get barb lengths(default arrow length = 30% barb length)
0 commit comments