diff options
Diffstat (limited to 'gnuplot.py')
-rwxr-xr-x[-rw-r--r--] | gnuplot.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gnuplot.py b/gnuplot.py index d610875..e16de77 100644..100755 --- a/gnuplot.py +++ b/gnuplot.py | |||
@@ -1,3 +1,4 @@ | |||
1 | #!/usr/bin/env python | ||
1 | import defapp | 2 | import defapp |
2 | from subprocess import Popen, PIPE | 3 | from subprocess import Popen, PIPE |
3 | from optparse import make_option as o | 4 | from optparse import make_option as o |
@@ -73,6 +74,10 @@ def pipe2gnuplot(cmds): | |||
73 | proc.stdin.close() | 74 | proc.stdin.close() |
74 | proc.wait() | 75 | proc.wait() |
75 | 76 | ||
77 | def gnuplot(*args, **kargs): | ||
78 | cmd = gnuplot_cmd(*args, **kargs) | ||
79 | pipe2gnuplot(cmd) | ||
80 | |||
76 | def eps2pdf(file): | 81 | def eps2pdf(file): |
77 | Popen(['ps2pdf', '-dEPSCrop', '%s.eps' % file]).wait() | 82 | Popen(['ps2pdf', '-dEPSCrop', '%s.eps' % file]).wait() |
78 | 83 | ||
@@ -100,9 +105,11 @@ defaults = { | |||
100 | 'ylabel' : None, | 105 | 'ylabel' : None, |
101 | 'xrange' : None, | 106 | 'xrange' : None, |
102 | 'yrange' : None, | 107 | 'yrange' : None, |
108 | 'xticks' : None, | ||
109 | 'yticks' : None, | ||
103 | } | 110 | } |
104 | 111 | ||
105 | class Plotter(defapp.App): | 112 | class GnuPlotter(defapp.App): |
106 | def __init__(self): | 113 | def __init__(self): |
107 | defapp.App.__init__(self, options, defaults, no_std_opts=True) | 114 | defapp.App.__init__(self, options, defaults, no_std_opts=True) |
108 | 115 | ||
@@ -135,4 +142,4 @@ class Plotter(defapp.App): | |||
135 | self.out(cmd) | 142 | self.out(cmd) |
136 | 143 | ||
137 | if __name__ == "__main__": | 144 | if __name__ == "__main__": |
138 | Plotter().launch() | 145 | GnuPlotter().launch() |