|
13 | 13 |
|
14 | 14 | import numpy as np
|
15 | 15 |
|
16 |
| -from . import artist, colors as mcolors, docstring, rcParams |
| 16 | +from . import artist, cbook, colors as mcolors, docstring, rcParams |
17 | 17 | from .artist import Artist, allow_rasterization
|
18 | 18 | from .cbook import (
|
19 | 19 | _to_unmasked_float_array, iterable, is_numlike, ls_mapper, ls_mapper_r,
|
@@ -793,16 +793,16 @@ def draw(self, renderer):
|
793 | 793 | rgbaFace = self._get_rgba_face()
|
794 | 794 | rgbaFaceAlt = self._get_rgba_face(alt=True)
|
795 | 795 | edgecolor = self.get_markeredgecolor()
|
796 |
| - if (isinstance(edgecolor, six.string_types) |
797 |
| - and edgecolor.lower() == 'none'): |
| 796 | + if cbook._str_equal(edgecolor, "none"): |
798 | 797 | gc.set_linewidth(0)
|
799 | 798 | gc.set_foreground(rgbaFace, isRGBA=True)
|
800 | 799 | else:
|
801 | 800 | gc.set_foreground(edgecolor)
|
802 | 801 | gc.set_linewidth(self._markeredgewidth)
|
803 | 802 | mec = self._markeredgecolor
|
804 |
| - if (isinstance(mec, six.string_types) and mec == 'auto' and |
805 |
| - rgbaFace is not None): |
| 803 | + if (cbook._str_equal(mec, "auto") |
| 804 | + and not cbook._str_equal(self.get_markerfacecolor(), |
| 805 | + "none")): |
806 | 806 | gc.set_alpha(rgbaFace[3])
|
807 | 807 | else:
|
808 | 808 | gc.set_alpha(self.get_alpha())
|
@@ -1257,13 +1257,7 @@ def update_from(self, other):
|
1257 | 1257 | self._drawstyle = other._drawstyle
|
1258 | 1258 |
|
1259 | 1259 | def _get_rgba_face(self, alt=False):
|
1260 |
| - facecolor = self._get_markerfacecolor(alt=alt) |
1261 |
| - if (isinstance(facecolor, six.string_types) |
1262 |
| - and facecolor.lower() == 'none'): |
1263 |
| - rgbaFace = None |
1264 |
| - else: |
1265 |
| - rgbaFace = mcolors.to_rgba(facecolor, self._alpha) |
1266 |
| - return rgbaFace |
| 1260 | + return mcolors.to_rgba(self._get_markerfacecolor(alt=alt), self._alpha) |
1267 | 1261 |
|
1268 | 1262 | def _get_rgba_ln_color(self, alt=False):
|
1269 | 1263 | return mcolors.to_rgba(self._color, self._alpha)
|
|
0 commit comments