Skip to content

Commit c443a42

Browse files
ZzN1NJ4jklymak
andauthored
Update lib/matplotlib/axes/_base.py
Co-authored-by: Jody Klymak <[email protected]>
1 parent bc95b91 commit c443a42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):
16801680
aspect = 1
16811681
if not cbook._str_equal(aspect, 'auto'):
16821682
aspect = float(aspect) # raise ValueError if necessary
1683-
if aspect <= 0:
1683+
if aspect <= 0 or ~np.isfinite(aspect):
16841684
raise ValueError("aspect must be positive")
16851685

16861686
if share:

0 commit comments

Comments
 (0)