diff options
author | Björn B. Brandenburg <bbb@cs.unc.edu> | 2010-03-26 14:54:59 -0400 |
---|---|---|
committer | Björn B. Brandenburg <bbb@cs.unc.edu> | 2010-03-26 14:54:59 -0400 |
commit | 40333dd77fecd8a2dec2e982a89678e0849bf3be (patch) | |
tree | 850c55a61e29c085a9815ad14c258f30ac937a0b | |
parent | 0c6cb5129ccce032fcc5aea0859b46129c180c5c (diff) |
allow simple lines in gnuplot.py
This thing keeps getting uglier...
-rwxr-xr-x | gnuplot.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -56,8 +56,13 @@ def gnuplot_cmd(graphs, title=None, ylabel=None, xlabel=None, | |||
56 | g('set key %s' % key) | 56 | g('set key %s' % key) |
57 | plot = [] | 57 | plot = [] |
58 | for gr in graphs: | 58 | for gr in graphs: |
59 | par = (gr[0], gr[1], gr[2], gr[3], style) if len(gr) == 4 else gr | 59 | if len(gr) == 4: |
60 | plot += ["'%s' using %s:%s title '%s' with %s" % par] | 60 | par = (gr[0], gr[1], gr[2], gr[3], style) |
61 | plot += ["'%s' using %s:%s title '%s' with %s" % par] | ||
62 | elif len(gr) == 5: | ||
63 | plot += ["'%s' using %s:%s title '%s' with %s" % gr] | ||
64 | elif len(gr) == 3: | ||
65 | plot += ["%s title '%s' with %s" % gr] | ||
61 | if plot: | 66 | if plot: |
62 | g('plot ' + ', '.join(plot)) | 67 | g('plot ' + ', '.join(plot)) |
63 | if format != 'show' and fname: | 68 | if format != 'show' and fname: |