|
16 | 16 | from matplotlib import _preprocess_data |
17 | 17 |
|
18 | 18 | import matplotlib.cbook as cbook |
19 | | -from matplotlib.cbook import (mplDeprecation, STEP_LOOKUP_MAP, |
20 | | - iterable, is_string_like, |
21 | | - safe_first_element) |
| 19 | +from matplotlib.cbook import ( |
| 20 | + mplDeprecation, STEP_LOOKUP_MAP, iterable, safe_first_element) |
22 | 21 | import matplotlib.collections as mcoll |
23 | 22 | import matplotlib.colors as mcolors |
24 | 23 | import matplotlib.contour as mcontour |
@@ -2662,7 +2661,7 @@ def get_next_color(): |
2662 | 2661 | if autopct is not None: |
2663 | 2662 | xt = x + pctdistance * radius * math.cos(thetam) |
2664 | 2663 | yt = y + pctdistance * radius * math.sin(thetam) |
2665 | | - if is_string_like(autopct): |
| 2664 | + if isinstance(autopct, six.string_types): |
2666 | 2665 | s = autopct % (100. * frac) |
2667 | 2666 | elif callable(autopct): |
2668 | 2667 | s = autopct(100. * frac) |
@@ -5472,8 +5471,8 @@ def pcolor(self, *args, **kwargs): |
5472 | 5471 | # makes artifacts that are often disturbing. |
5473 | 5472 | if 'antialiased' in kwargs: |
5474 | 5473 | kwargs['antialiaseds'] = kwargs.pop('antialiased') |
5475 | | - if 'antialiaseds' not in kwargs and (is_string_like(ec) and |
5476 | | - ec.lower() == "none"): |
| 5474 | + if 'antialiaseds' not in kwargs and ( |
| 5475 | + isinstance(ec, six.string_types) and ec.lower() == "none"): |
5477 | 5476 | kwargs['antialiaseds'] = False |
5478 | 5477 |
|
5479 | 5478 | kwargs.setdefault('snap', False) |
@@ -6377,7 +6376,7 @@ def hist(self, x, bins=None, range=None, normed=False, weights=None, |
6377 | 6376 |
|
6378 | 6377 | if label is None: |
6379 | 6378 | labels = [None] |
6380 | | - elif is_string_like(label): |
| 6379 | + elif isinstance(label, six.string_types): |
6381 | 6380 | labels = [label] |
6382 | 6381 | else: |
6383 | 6382 | labels = [six.text_type(lab) for lab in label] |
|
0 commit comments