MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_offsets

Method set_offsets

lib/matplotlib/quiver.py:1219–1235  ·  view source on GitHub ↗

Set the offsets for the barb polygons. This saves the offsets passed in and masks them as appropriate for the existing U/V data. Parameters ---------- xy : sequence of pairs of floats

(self, xy)

Source from the content-addressed store, hash-verified

1217 self.stale = True
1218
1219 def set_offsets(self, xy):
1220 """
1221 Set the offsets for the barb polygons. This saves the offsets passed
1222 in and masks them as appropriate for the existing U/V data.
1223
1224 Parameters
1225 ----------
1226 xy : sequence of pairs of floats
1227 """
1228 self.x = xy[:, 0]
1229 self.y = xy[:, 1]
1230 x, y, u, v = cbook.delete_masked_points(
1231 self.x.ravel(), self.y.ravel(), self.u, self.v)
1232 _check_consistent_shapes(x, y, u, v)
1233 xy = np.column_stack((x, y))
1234 super().set_offsets(xy)
1235 self.stale = True

Callers 15

do_3d_projectionMethod · 0.45
do_3d_projectionMethod · 0.45
_use_zordered_offsetMethod · 0.45
test_mixed_collectionFunction · 0.45
test_relim_collectionFunction · 0.45
test_set_offsets_lateFunction · 0.45
test_set_offset_unitsFunction · 0.45
test_masked_set_offsetsFunction · 0.45
test_check_offsets_dtypeFunction · 0.45

Calls 1

_check_consistent_shapesFunction · 0.85