Return the format for tick value *x* at position *pos*. If there is no currently offset in the data, it returns the best engineering formatting that fits the given argument, independently.
(self, x, pos=None)
| 1488 | ) |
| 1489 | |
| 1490 | def __call__(self, x, pos=None): |
| 1491 | """ |
| 1492 | Return the format for tick value *x* at position *pos*. |
| 1493 | |
| 1494 | If there is no currently offset in the data, it returns the best |
| 1495 | engineering formatting that fits the given argument, independently. |
| 1496 | """ |
| 1497 | if len(self._locs) == 0 or self.offset == 0: |
| 1498 | return self.fix_minus(self.format_data(x)) |
| 1499 | else: |
| 1500 | xp = (x - self.offset) / (10. ** self._orderOfMagnitude) |
| 1501 | if abs(xp) < 1e-8: |
| 1502 | xp = 0 |
| 1503 | return self._format_maybe_minus_and_locale(self._format, xp) |
| 1504 | |
| 1505 | def set_locs(self, locs): |
| 1506 | # docstring inherited |
nothing calls this directly
no test coverage detected