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

Skip to content

Commit abcef5a

Browse files
committed
Use cbook string class checker
1 parent a33be77 commit abcef5a

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
@@ -1282,7 +1282,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None):
12821282
etc.
12831283
===== =====================
12841284
"""
1285-
if isinstance(aspect, str) and aspect in ('equal', 'auto'):
1285+
if cbook.is_string_like(aspect) and aspect in ('equal', 'auto'):
12861286
self._aspect = aspect
12871287
else:
12881288
self._aspect = float(aspect) # raise ValueError if necessary

0 commit comments

Comments
 (0)