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

Method _validate_steps

lib/matplotlib/ticker.py:2165–2177  ·  view source on GitHub ↗
(steps)

Source from the content-addressed store, hash-verified

2163
2164 @staticmethod
2165 def _validate_steps(steps):
2166 if not np.iterable(steps):
2167 raise ValueError('steps argument must be an increasing sequence '
2168 'of numbers between 1 and 10 inclusive')
2169 steps = np.asarray(steps)
2170 if np.any(np.diff(steps) <= 0) or steps[-1] > 10 or steps[0] < 1:
2171 raise ValueError('steps argument must be an increasing sequence '
2172 'of numbers between 1 and 10 inclusive')
2173 if steps[0] != 1:
2174 steps = np.concatenate([[1], steps])
2175 if steps[-1] != 10:
2176 steps = np.concatenate([steps, [10]])
2177 return steps
2178
2179 @staticmethod
2180 def _staircase(steps):

Callers 1

set_paramsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected