MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _format

Method _format

lib/matplotlib/widgets.py:601–611  ·  view source on GitHub ↗

Pretty-print *val*.

(self, val)

Source from the content-addressed store, hash-verified

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

Callers 2

__init__Method · 0.95
set_valMethod · 0.95

Calls 2

format_ticksMethod · 0.45
get_offsetMethod · 0.45

Tested by

no test coverage detected