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

Method _uniform_y

lib/matplotlib/colorbar.py:1235–1245  ·  view source on GitHub ↗

Return colorbar data coordinates for *N* uniformly spaced boundaries, plus extension lengths if required.

(self, N)

Source from the content-addressed store, hash-verified

1233 # trivial helpers
1234
1235 def _uniform_y(self, N):
1236 """
1237 Return colorbar data coordinates for *N* uniformly
1238 spaced boundaries, plus extension lengths if required.
1239 """
1240 automin = automax = 1. / (N - 1.)
1241 extendlength = self._get_extension_lengths(self.extendfrac,
1242 automin, automax,
1243 default=0.05)
1244 y = np.linspace(0, 1, N)
1245 return y, extendlength
1246
1247 def _proportional_y(self):
1248 """

Callers 1

_process_valuesMethod · 0.95

Calls 1

Tested by

no test coverage detected