summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2008-05-17 11:01:49 +0200
committerGuillaume Seguin <guillaume@segu.in>2008-05-17 11:01:49 +0200
commit37915d912bf4645329c55dd382af2a9985a67729 (patch)
treeaa6a45d44b8198e64dde371fbe8c72c5dba615c1
parent97f372e25d0aaf44eaefd1fd59af98673840f1af (diff)
downloadgnxtlogger-37915d912bf4645329c55dd382af2a9985a67729.tar.gz
gnxtlogger-37915d912bf4645329c55dd382af2a9985a67729.tar.bz2
* Add more line types to ensure unicity of each plot line
-rw-r--r--nxtlogger/chart.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/nxtlogger/chart.py b/nxtlogger/chart.py
index b1576c1..97c7429 100644
--- a/nxtlogger/chart.py
+++ b/nxtlogger/chart.py
@@ -57,6 +57,11 @@ class TickFormatter (Formatter):
DPI = 72
COLORS = ["b", "r", "g"]
+LINES = ["-", "--", ":", "-.", "."]
+TYPES = []
+for line in LINES:
+ for color in COLORS:
+ TYPES.append ("%s%s" % (line, color))
def plot_data (y_data_sets, x_data, width, height):
size = (float (width) / DPI, float (height) / DPI)
@@ -68,7 +73,8 @@ 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" % COLORS[i % len (COLORS)])
+ "%s" % TYPES[i % len (TYPES)])
+
fig.autofmt_xdate ()