_validate_axis_limits
Signature
_validate_axis_limits(
limits: ArrayLike,
*,
name: str,
min_label: str,
max_label: str,
) -> tuple[float, float]
What problem it solves
Converts and validates a pair of axis or range limits while keeping error messages specific to the parameter that requested them.
Input contract
limitsmust be a sequence of exactly two elements.Strings and
bytesare rejected explicitly.Both values must be convertible to
floatand finite.
Where it is used
Failure modes
ValueErroriflimitsis not a valid sequenceValueErrorif it does not contain exactly two elementsValueErrorif it contains non-finite values
Why it stays private
It is a support validator for the plotting layer. Its usefulness is internal, but documenting it makes the common plotting rules easier to read.