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

Method view_limits

lib/matplotlib/ticker.py:2601–2611  ·  view source on GitHub ↗

Try to choose the view limits intelligently.

(self, vmin, vmax)

Source from the content-addressed store, hash-verified

2599 return self.raise_if_exceeds(ticklocs)
2600
2601 def view_limits(self, vmin, vmax):
2602 """Try to choose the view limits intelligently."""
2603 b = self._base
2604
2605 vmin, vmax = self.nonsingular(vmin, vmax)
2606
2607 if mpl.rcParams['axes.autolimit_mode'] == 'round_numbers':
2608 vmin = _decade_less_equal(vmin, b)
2609 vmax = _decade_greater_equal(vmax, b)
2610
2611 return vmin, vmax
2612
2613 def nonsingular(self, vmin, vmax):
2614 if vmin > vmax:

Callers

nothing calls this directly

Calls 3

nonsingularMethod · 0.95
_decade_less_equalFunction · 0.85
_decade_greater_equalFunction · 0.85

Tested by

no test coverage detected