We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97ea6ef commit 7fd3b7bCopy full SHA for 7fd3b7b
lib/matplotlib/lines.py
@@ -1505,8 +1505,8 @@ def get_transform(self):
1505
points_transform.transform([self._xy1, self._xy2])
1506
dx = x2 - x1
1507
dy = y2 - y1
1508
- if np.allclose(x1, x2):
1509
- if np.allclose(y1, y2):
+ if dx == 0:
+ if dy == 0:
1510
raise ValueError(
1511
f"Cannot draw a line through two identical points "
1512
f"(x={(x1, x2)}, y={(y1, y2)})")
0 commit comments