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

Skip to content

Commit e822765

Browse files
committed
Almost fixed
Almost fixed
1 parent 39694f2 commit e822765

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/category.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ def convert(value, unit, axis):
4040
"""Uses axis.unit_data map to encode
4141
data as floats
4242
"""
43+
value = np.atleast_1d(value)
44+
# try and update from here....
45+
if hasattr(axis.unit_data, 'update'):
46+
for val in value:
47+
if isinstance(val, six.string_types):
48+
axis.unit_data.update(val)
4349
vmap = dict(zip(axis.unit_data.seq, axis.unit_data.locs))
4450

4551
if isinstance(value, six.string_types):

0 commit comments

Comments
 (0)