Skip to content

Commit a58c79a

Browse files
committed
Fix bug where unnamed pd.Index labels not used in auto-legend
1 parent 143836c commit a58c79a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

proplot/wrappers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,8 +1842,9 @@ def cycle_changer(
18421842
)
18431843
label = labels[i]
18441844
values, label_leg = _standard_label(iy, axis=1)
1845-
if label_leg and label is None:
1846-
label = _to_ndarray(values)[i]
1845+
values = _to_ndarray(values)
1846+
if label_leg and (label is None or isinstance(values[i], str)):
1847+
label = values[i]
18471848
if label is not None:
18481849
kw['label'] = label
18491850

0 commit comments

Comments
 (0)