Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e822765

Browse filesBrowse files
committed
Almost fixed
Almost fixed
1 parent 39694f2 commit e822765
Copy full SHA for e822765

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

‎lib/matplotlib/category.py

Copy file name to clipboardExpand all lines: lib/matplotlib/category.py
+6Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.