diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index 569669f76e8d..d24e528e4c0a 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -1505,8 +1505,8 @@ def get_transform(self): points_transform.transform([self._xy1, self._xy2]) dx = x2 - x1 dy = y2 - y1 - if np.allclose(x1, x2): - if np.allclose(y1, y2): + if dx == 0: + if dy == 0: raise ValueError( f"Cannot draw a line through two identical points " f"(x={(x1, x2)}, y={(y1, y2)})")
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: