Skip to content

Commit 926c259

Browse files
committed
axis: add Axis.val_in_range to delgate the domain check
1 parent f91d2b4 commit 926c259

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/matplotlib/axis.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,13 @@ def limit_range_for_scale(self, vmin, vmax):
824824
current scale.
825825
"""
826826
return self._scale.limit_range_for_scale(vmin, vmax, self.get_minpos())
827+
828+
def val_in_range(self, val):
829+
"""
830+
Return `True` if the value(s) lie within the domain supported by the
831+
current scale.
832+
"""
833+
return self._scale.val_in_range(val)
827834

828835
def _get_autoscale_on(self):
829836
"""Return whether this Axis is autoscaled."""

0 commit comments

Comments
 (0)