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

Method _nan_out_of_scale_range

lib/matplotlib/axis.py:840–847  ·  view source on GitHub ↗

Return *data* with values that are out of range for this axis's scale replaced by NaN. E.g. ``<=0`` on a log axis.

(self, data)

Source from the content-addressed store, hash-verified

838 return self._scale.limit_range_for_scale(vmin, vmax, self.get_minpos())
839
840 def _nan_out_of_scale_range(self, data):
841 """
842 Return *data* with values that are out of range for this axis&#x27;s scale
843 replaced by NaN. E.g. ``<=0`` on a log axis.
844 """
845 data = np.asanyarray(data, dtype=float)
846 valid = self._scale.val_in_range(data)
847 return data if np.all(valid) else np.where(valid, data, np.nan)
848
849 def _get_autoscale_on(self):
850 """Return whether this Axis is autoscaled."""

Callers 1

auto_scale_xyzMethod · 0.80

Calls 1

val_in_rangeMethod · 0.45

Tested by

no test coverage detected