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

Method _log_b

lib/matplotlib/ticker.py:2472–2478  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

2470 return self.tick_values(vmin, vmax)
2471
2472 def _log_b(self, x):
2473 # Use specialized logs if possible, as they can be more accurate; e.g.
2474 # log(.001) / log(10) = -2.999... (whether math.log or np.log) due to
2475 # floating point error.
2476 return (np.log10(x) if self._base == 10 else
2477 np.log2(x) if self._base == 2 else
2478 np.log(x) / np.log(self._base))
2479
2480 def tick_values(self, vmin, vmax):
2481 n_request = (

Callers 1

tick_valuesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected