Skip to content

Commit 02417c8

Browse files
committed
Fix issue when using numeric zero as legend label
1 parent 0420b98 commit 02417c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

proplot/axes/plot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2376,7 +2376,9 @@ def cycle_changer(
23762376
labels[i] = ilabel
23772377

23782378
# Sanitize labels
2379-
labels = [_not_none(label, '') for label in labels]
2379+
# WARNING: Must convert labels to string here because e.g. scatter() applies
2380+
# default label if input is False-ey. So numeric '0' would be overridden.
2381+
labels = [str(_not_none(label, '')) for label in labels]
23802382

23812383
# Get step size for bar plots
23822384
# WARNING: This will fail for non-numeric non-datetime64 singleton

0 commit comments

Comments
 (0)