Skip to content
Merged
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
12 changes: 6 additions & 6 deletions lib/matplotlib/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,18 @@ def update(self, data):
"""
data = np.atleast_1d(np.array(data, dtype=object))

# check if convertable to number:
convertable = True
# check if convertible to number:
convertible = True
for val in OrderedDict.fromkeys(data):
# OrderedDict just iterates over unique values in data.
if not isinstance(val, (str, bytes)):
raise TypeError("{val!r} is not a string".format(val=val))
if convertable:
# this will only be called so long as convertable is True.
convertable = self._str_is_convertible(val)
if convertible:
# this will only be called so long as convertible is True.
convertible = self._str_is_convertible(val)
if val not in self._mapping:
self._mapping[val] = next(self._counter)
if convertable:
if convertible:
_log.info('Using categorical units to plot a list of strings '
'that are all parsable as floats or dates. If these '
'strings should be plotted as numbers, cast to the '
Expand Down