Use cbook methods for string checking by oscargus · Pull Request #26744 · matplotlib/matplotlib · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/_mathtext.py
4 changes: 2 additions & 2 deletions lib/matplotlib/legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import numpy as np

import matplotlib as mpl
from matplotlib import _api, _docstring, colors, offsetbox
from matplotlib import _api, _docstring, cbook, colors, offsetbox
from matplotlib.artist import Artist, allow_rasterization
from matplotlib.cbook import silent_list
from matplotlib.font_manager import FontProperties
Expand Down Expand Up @@ -622,7 +622,7 @@ def __init__(
break
except AttributeError:
pass
elif isinstance(labelcolor, str) and labelcolor == 'none':
elif cbook._str_equal(labelcolor, 'none'):
for text in self.texts:
text.set_color(labelcolor)
elif np.iterable(labelcolor):
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/rcsetup.py