Skip to content

Commit 2a2f2d2

Browse files
committed
Fix bug with length-zero label values
1 parent d4acbaa commit 2a2f2d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

proplot/wrappers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,9 @@ def cycle_changer(
18581858
label = labels[i] # input labels
18591859
labels_cols, label_leg_cbar = _axis_labels_title(y_first, axis=1)
18601860
labels_cols = _to_ndarray(labels_cols)
1861-
if label is None and (label_leg_cbar or isinstance(labels_cols[i], str)):
1861+
if label is None and (
1862+
label_leg_cbar or labels_cols.size and isinstance(labels_cols[i], str)
1863+
):
18621864
label = labels_cols[i]
18631865
if label is not None:
18641866
kw['label'] = label

0 commit comments

Comments
 (0)