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

Method view_limits

lib/matplotlib/ticker.py:2035–2049  ·  view source on GitHub ↗

Set the view limits to the nearest tick values that contain the data.

(self, dmin, dmax)

Source from the content-addressed store, hash-verified

2033 return self.raise_if_exceeds(locs)
2034
2035 def view_limits(self, dmin, dmax):
2036 """
2037 Set the view limits to the nearest tick values that contain the data.
2038 """
2039 if mpl.rcParams['axes.autolimit_mode'] == 'round_numbers':
2040 vmin = self._edge.le(dmin - self._offset) * self._edge.step + self._offset
2041 vmax = self._edge.ge(dmax - self._offset) * self._edge.step + self._offset
2042 if vmin == vmax:
2043 vmin -= 1
2044 vmax += 1
2045 else:
2046 vmin = dmin
2047 vmax = dmax
2048
2049 return mtransforms._nonsingular(vmin, vmax)
2050
2051
2052def scale_range(vmin, vmax, n=1, threshold=100):

Calls 2

leMethod · 0.80
geMethod · 0.80