Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c211c9

Browse files
committed
Fix docs and closeness checking
1 parent 9516863 commit 8c211c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ def axline(self, xy1, xy2, **kwargs):
915915
916916
Parameters
917917
----------
918-
xy1, xy2 : length 2 iterables
918+
xy1, xy2 : (float, float)
919919
Points for the line to pass through.
920920
921921
Returns
@@ -956,7 +956,7 @@ def axline(self, xy1, xy2, **kwargs):
956956
x1, y1 = xy1
957957
x2, y2 = xy2
958958
# If x values the same, we have a vertical line
959-
if x1 == x2:
959+
if np.allclose(x1, x2):
960960
line = self.axvline(x1, **kwargs)
961961
return line
962962

0 commit comments

Comments
 (0)