Skip to content

Commit cbebc61

Browse files
authored
Merge pull request #28988 from meeseeksmachine/auto-backport-of-pr-28987-on-v3.9.x
Backport PR #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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy