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

Method _num_to_string

lib/matplotlib/ticker.py:1135–1142  ·  view source on GitHub ↗
(self, x, vmin, vmax)

Source from the content-addressed store, hash-verified

1133 """
1134
1135 def _num_to_string(self, x, vmin, vmax):
1136 fx = math.log(x) / math.log(self._base)
1137 if 1 <= abs(fx) <= 10000:
1138 fd = math.log(vmax - vmin) / math.log(self._base)
1139 s = self._pprint_val(fx, fd)
1140 else:
1141 s = f"{fx:1.0g}"
1142 return s
1143
1144
1145class LogFormatterMathtext(LogFormatter):

Callers

nothing calls this directly

Calls 1

_pprint_valMethod · 0.80

Tested by

no test coverage detected