Pretty-print *val*.
(self, val)
| 599 | self.set_val(val) |
| 600 | |
| 601 | def _format(self, val): |
| 602 | """Pretty-print *val*.""" |
| 603 | if self.valfmt is not None: |
| 604 | if callable(self.valfmt): |
| 605 | return self.valfmt(val) |
| 606 | else: |
| 607 | return self.valfmt % val |
| 608 | else: |
| 609 | _, s, _ = self._fmt.format_ticks([self.valmin, val, self.valmax]) |
| 610 | # fmt.get_offset is actually the multiplicative factor, if any. |
| 611 | return s + self._fmt.get_offset() |
| 612 | |
| 613 | def set_val(self, val): |
| 614 | """ |
no test coverage detected