aboutsummaryrefslogtreecommitdiffstats
path: root/gnuplot.py
diff options
context:
space:
mode:
Diffstat (limited to 'gnuplot.py')
-rwxr-xr-xgnuplot.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnuplot.py b/gnuplot.py
index 925b4b3..2604cb0 100755
--- a/gnuplot.py
+++ b/gnuplot.py
@@ -3,7 +3,7 @@ import defapp
3from subprocess import Popen, PIPE 3from subprocess import Popen, PIPE
4from optparse import make_option as o 4from optparse import make_option as o
5 5
6FORMATS = ['png', 'eps', 'pdf', 'show'] 6FORMATS = ['png', 'eps', 'pdf', 'show', 'ps']
7STYLES = ['points', 'lines', 'linespoints'] 7STYLES = ['points', 'lines', 'linespoints']
8 8
9class CommandBuffer(object): 9class CommandBuffer(object):
@@ -59,6 +59,10 @@ def gnuplot_cmd(graphs, title=None, ylabel=None, xlabel=None,
59 terminal = 'postscript eps' 59 terminal = 'postscript eps'
60 if term_opts is None: 60 if term_opts is None:
61 term_opts = 'color blacktext solid linewidth 1.0' 61 term_opts = 'color blacktext solid linewidth 1.0'
62 elif format == 'ps':
63 terminal = 'postscript'
64 if term_opts is None:
65 term_opts = 'color enhanced'
62 elif format == 'pdf': 66 elif format == 'pdf':
63 terminal = 'pdf' 67 terminal = 'pdf'
64 if term_opts is None: 68 if term_opts is None:
@@ -98,6 +102,9 @@ def gnuplot_cmd(graphs, title=None, ylabel=None, xlabel=None,
98 elif len(gr) == 4: 102 elif len(gr) == 4:
99 par = (gr[0], gr[1], gr[2], gr[3], style) 103 par = (gr[0], gr[1], gr[2], gr[3], style)
100 plot += ["'%s' using %s:%s title '%s' with %s" % par] 104 plot += ["'%s' using %s:%s title '%s' with %s" % par]
105 elif len(gr) == 6:
106 par = (gr[0], gr[1], gr[2], gr[3], gr[4], style, gr[5])
107 plot += ["'%s' using %s:%s:%s:%s with %s title '%s'" % par]
101 elif len(gr) == 5: 108 elif len(gr) == 5:
102 plot += ["'%s' using %s:%s title '%s' with %s" % gr] 109 plot += ["'%s' using %s:%s title '%s' with %s" % gr]
103 elif len(gr) == 3: 110 elif len(gr) == 3: