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

Method autoscale

lib/matplotlib/colors.py:2767–2773  ·  view source on GitHub ↗

Set *halfrange* to ``max(abs(A-vcenter))``, then set *vmin* and *vmax*.

(self, A)

Source from the content-addressed store, hash-verified

2765 self.halfrange = halfrange
2766
2767 def autoscale(self, A):
2768 """
2769 Set *halfrange* to ``max(abs(A-vcenter))``, then set *vmin* and *vmax*.
2770 """
2771 A = np.asanyarray(A)
2772 self.halfrange = max(self._vcenter-A.min(),
2773 A.max()-self._vcenter)
2774
2775 def autoscale_None(self, A):
2776 """Set *vmin* and *vmax*."""

Callers 1

autoscale_NoneMethod · 0.95

Calls 2

minMethod · 0.80
maxMethod · 0.80

Tested by

no test coverage detected