MCPcopy Create free account
hub / github.com/plotly/plotly.py / get_barbs

Method get_barbs

plotly/figure_factory/_quiver.py:176–194  ·  view source on GitHub ↗

Creates x and y startpoint and endpoint pairs After finding the endpoint of each barb this zips startpoint and endpoint pairs to create 2 lists: x_values for barbs and y values for barbs :rtype: (list, list) barb_x, barb_y: list of startpoint and endpoint

(self)

Source from the content-addressed store, hash-verified

174 self.v = [i * self.scale for i in self.v]
175
176 def get_barbs(self):
177 """
178 Creates x and y startpoint and endpoint pairs
179
180 After finding the endpoint of each barb this zips startpoint and
181 endpoint pairs to create 2 lists: x_values for barbs and y values
182 for barbs
183
184 :rtype: (list, list) barb_x, barb_y: list of startpoint and endpoint
185 x_value pairs separated by a None to create the barb of the arrow,
186 and list of startpoint and endpoint y_value pairs separated by a
187 None to create the barb of the arrow.
188 """
189 self.end_x = [i + j for i, j in zip(self.x, self.u)]
190 self.end_y = [i + j for i, j in zip(self.y, self.v)]
191 empty = [None] * len(self.x)
192 barb_x = utils.flatten(zip(self.x, self.end_x, empty))
193 barb_y = utils.flatten(zip(self.y, self.end_y, empty))
194 return barb_x, barb_y
195
196 def get_quiver_arrows(self):
197 """

Callers 2

__init__Method · 0.95
create_quiverFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected