Skip to content

Commit cbebc61

Browse files
authored
Merge pull request matplotlib#28988 from meeseeksmachine/auto-backport-of-pr-28987-on-v3.9.x
Backport PR matplotlib#28987 on branch v3.9.x (Fix: Do not use numeric tolerances for axline special cases)
2 parents da88f66 + 7fd3b7b commit cbebc61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/lines.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,8 +1505,8 @@ def get_transform(self):
15051505
points_transform.transform([self._xy1, self._xy2])
15061506
dx = x2 - x1
15071507
dy = y2 - y1
1508-
if np.allclose(x1, x2):
1509-
if np.allclose(y1, y2):
1508+
if dx == 0:
1509+
if dy == 0:
15101510
raise ValueError(
15111511
f"Cannot draw a line through two identical points "
15121512
f"(x={(x1, x2)}, y={(y1, y2)})")

0 commit comments

Comments
 (0)