Skip to content

Commit b75ca18

Browse files
committed
Add warning message when users pass invalid legend handles
1 parent 85c13e4 commit b75ca18

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

proplot/axes/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,6 +2424,8 @@ def _legend_tuple(*objs): # noqa: E306
24242424
handles.append(obj)
24252425
elif hasattr(obj, 'get_label'):
24262426
handles.append(obj)
2427+
else:
2428+
warnings._warn_proplot(f'Ignoring invalid legend handle {obj!r}.')
24272429
return tuple(handles)
24282430

24292431
# Sanitize labels. Ignore e.g. extra hist() or hist2d() return values,

0 commit comments

Comments
 (0)