MCPcopy
hub / github.com/pandas-dev/pandas / get_xlim

Function get_xlim

pandas/plotting/_matplotlib/tools.py:485–491  ·  view source on GitHub ↗
(lines: Iterable[Line2D])

Source from the content-addressed store, hash-verified

483
484
485def get_xlim(lines: Iterable[Line2D]) -> tuple[float, float]:
486 left, right = np.inf, -np.inf
487 for line in lines:
488 x = line.get_xdata(orig=False)
489 left = min(np.nanmin(x), left)
490 right = max(np.nanmax(x), right)
491 return left, right

Callers 1

_make_plotMethod · 0.90

Calls 2

minFunction · 0.85
maxFunction · 0.85

Tested by

no test coverage detected