diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-04-02 15:26:30 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-04-02 15:26:30 -0400 |
commit | fa1fb842fe42e07508cc8f6cf371aeb468b077a3 (patch) | |
tree | 4c13adfca369e73f0a2a9e2ba9f5857b2e2f985b /gnuplot.py | |
parent | 0fbeff4a0887a48dea0a95a1d51e4ff9766c8d12 (diff) |
Better file processing in plot_pm and plotting errorbars
Diffstat (limited to 'gnuplot.py')
-rwxr-xr-x | gnuplot.py | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -56,8 +56,15 @@ 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) == 6: | ||
63 | par = (gr[0], gr[1], gr[2], gr[3], gr[4], style, gr[5]) | ||
64 | plot += ["'%s' using %s:%s:%s:%s with %s title '%s'" % par] | ||
65 | else: | ||
66 | par = gr | ||
67 | plot += ["'%s' using %s:%s title '%s' with %s" % par] | ||
61 | if plot: | 68 | if plot: |
62 | g('plot ' + ', '.join(plot)) | 69 | g('plot ' + ', '.join(plot)) |
63 | if format != 'show' and fname: | 70 | if format != 'show' and fname: |