summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2008-05-17 12:12:03 +0200
committerGuillaume Seguin <guillaume@segu.in>2008-05-17 12:12:03 +0200
commita4ae6436d58d96141936f003dbf422ed6e49cb89 (patch)
tree028bae642ef06e680508b45dfa018a97c861b961
parenta805851a87275e96738fd9152554ce544780080e (diff)
downloadgnxtlogger-a4ae6436d58d96141936f003dbf422ed6e49cb89.tar.gz
gnxtlogger-a4ae6436d58d96141936f003dbf422ed6e49cb89.tar.bz2
* Add legend to chartsHEADmaster
-rw-r--r--nxtlogger/chart.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/nxtlogger/chart.py b/nxtlogger/chart.py
index 5728226..8e68ae7 100644
--- a/nxtlogger/chart.py
+++ b/nxtlogger/chart.py
@@ -74,9 +74,11 @@ def plot_data (y_data_sets, x_data, width, height):
for i in range (len (y_data_sets)):
subplot.plot (asarray (y_data_sets[i][1]),
- "%s" % TYPES[i % len (TYPES)])
+ "%s" % TYPES[i % len (TYPES)],
+ label = y_data_sets[i][0])
+ subplot.legend ()
fig.autofmt_xdate ()
canvas = FigureCanvas (fig)