Option to recode as one-hot for numpy output.
[lightning.git] / plot.go
diff --git a/plot.go b/plot.go
index 4941f6fe8b6d9e1bf7ac0db795af7da766de6804..5e2eb638454098f1e40019e67d4617f57b0cd6ad 100644 (file)
--- a/plot.go
+++ b/plot.go
@@ -116,7 +116,10 @@ if sys.argv[2]:
         'PJL': 'blueviolet',
     }
     for fnm in sorted(labels.keys()):
-        colors.append(labelcolors[labels[fnm]])
+        if labels[fnm] in labelcolors:
+            colors.append(labelcolors[labels[fnm]])
+        else:
+            colors.append('black')
 
 from matplotlib.figure import Figure
 from matplotlib.patches import Polygon