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)
| 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 |