Return ticks for plt.colorbar if the data is not numeric. Examples -------- >>> a = xr.DataArray(["b", "a", "a", "b", "c"]) >>> _Normalize(a).ticks array([1, 3, 5])
(self)
| 1580 | |
| 1581 | @property |
| 1582 | def ticks(self) -> np.ndarray | None: |
| 1583 | """ |
| 1584 | Return ticks for plt.colorbar if the data is not numeric. |
| 1585 | |
| 1586 | Examples |
| 1587 | -------- |
| 1588 | >>> a = xr.DataArray(["b", "a", "a", "b", "c"]) |
| 1589 | >>> _Normalize(a).ticks |
| 1590 | array([1, 3, 5]) |
| 1591 | """ |
| 1592 | val: np.ndarray | None |
| 1593 | if self.data_is_numeric: |
| 1594 | val = None |
| 1595 | else: |
| 1596 | val = self._indexes_centered(self._data_unique_index) |
| 1597 | |
| 1598 | return val |
| 1599 | |
| 1600 | @property |
| 1601 | def levels(self) -> np.ndarray: |
nothing calls this directly
no test coverage detected