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

Method view_limits

lib/matplotlib/ticker.py:2774–2787  ·  view source on GitHub ↗

Try to choose the view limits intelligently.

(self, vmin, vmax)

Source from the content-addressed store, hash-verified

2772 return self.raise_if_exceeds(np.array(ticklocs))
2773
2774 def view_limits(self, vmin, vmax):
2775 """Try to choose the view limits intelligently."""
2776 b = self._base
2777 if vmax < vmin:
2778 vmin, vmax = vmax, vmin
2779
2780 if mpl.rcParams['axes.autolimit_mode'] == 'round_numbers':
2781 vmin = _decade_less_equal(vmin, b)
2782 vmax = _decade_greater_equal(vmax, b)
2783 if vmin == vmax:
2784 vmin = _decade_less(vmin, b)
2785 vmax = _decade_greater(vmax, b)
2786
2787 return mtransforms._nonsingular(vmin, vmax)
2788
2789
2790class AsinhLocator(Locator):

Callers 1

test_extendingMethod · 0.95

Calls 4

_decade_less_equalFunction · 0.85
_decade_greater_equalFunction · 0.85
_decade_lessFunction · 0.85
_decade_greaterFunction · 0.85

Tested by 1

test_extendingMethod · 0.76