Skip to content

Commit 11cd956

Browse files
committed
remove extra instance of _Quiver object.
1 parent 4b57de2 commit 11cd956

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

Diff for: plotly/figure_factory/_quiver.py

+7-10
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,18 @@ def create_quiver(x, y, u, v, scale=.1, arrow_scale=.3,
8989
utils.validate_positive_scalars(arrow_scale=arrow_scale, scale=scale)
9090

9191
if scaleratio is None:
92-
barb_x, barb_y = _Quiver(x, y, u, v, scale,
93-
arrow_scale, angle).get_barbs()
94-
arrow_x, arrow_y = _Quiver(x, y, u, v, scale,
95-
arrow_scale, angle).get_quiver_arrows()
92+
quiver_obj = _Quiver(x, y, u, v, scale, arrow_scale, angle)
9693
else:
97-
barb_x, barb_y = _Quiver(x, y, u, v, scale,
98-
arrow_scale, angle, scaleratio).get_barbs()
99-
arrow_x, arrow_y = _Quiver(x, y, u, v, scale,
100-
arrow_scale, angle, scaleratio).get_quiver_arrows()
94+
quiver_obj = _Quiver(x, y, u, v, scale, arrow_scale, angle, scaleratio)
95+
96+
barb_x, barb_y = quiver_obj.get_barbs()
97+
arrow_x, arrow_y = quiver_obj.get_quiver_arrows()
10198

102-
quiver = graph_objs.Scatter(x=barb_x + arrow_x,
99+
quiver_plot = graph_objs.Scatter(x=barb_x + arrow_x,
103100
y=barb_y + arrow_y,
104101
mode='lines', **kwargs)
105102

106-
data = [quiver]
103+
data = [quiver_plot]
107104

108105
if scaleratio is None:
109106
layout = graph_objs.Layout(hovermode='closest')

0 commit comments

Comments
 (0)