Skip to content

Commit d769aba

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

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
@@ -1681,7 +1681,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):
16811681
if not cbook._str_equal(aspect, 'auto'):
16821682
aspect = float(aspect) # raise ValueError if necessary
16831683
if aspect <= 0 or ~np.isfinite(aspect):
1684-
raise ValueError("aspect must be positive")
1684+
raise ValueError(f"aspect must be finite and positive: aspect = {aspect}")
16851685

16861686
if share:
16871687
axes = {sibling for name in self._axis_names

0 commit comments

Comments
 (0)