Set the offsets for the collection. Parameters ---------- offsets : (N, 2) or (2,) array-like
(self, offsets)
| 623 | return self._hatch_linewidth |
| 624 | |
| 625 | def set_offsets(self, offsets): |
| 626 | """ |
| 627 | Set the offsets for the collection. |
| 628 | |
| 629 | Parameters |
| 630 | ---------- |
| 631 | offsets : (N, 2) or (2,) array-like |
| 632 | """ |
| 633 | offsets = np.asanyarray(offsets) |
| 634 | if offsets.shape == (2,): # Broadcast (2,) -> (1, 2) but nothing else. |
| 635 | offsets = offsets[None, :] |
| 636 | cstack = (np.ma.column_stack if isinstance(offsets, np.ma.MaskedArray) |
| 637 | else np.column_stack) |
| 638 | self._offsets = cstack( |
| 639 | (np.asanyarray(self.convert_xunits(offsets[:, 0]), float), |
| 640 | np.asanyarray(self.convert_yunits(offsets[:, 1]), float))) |
| 641 | self.stale = True |
| 642 | |
| 643 | def get_offsets(self): |
| 644 | """Return the offsets for the collection.""" |
nothing calls this directly
no test coverage detected