aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn B. Brandenburg <bbb@cs.unc.edu>2010-05-25 13:38:36 -0400
committerBjörn B. Brandenburg <bbb@cs.unc.edu>2010-05-25 13:38:36 -0400
commit1cc581db8752d2bdf0a1ad6516b57fc506227b8b (patch)
tree2c743404fe457c96308218539f0d6d7c14a34869
parent707f7ed573c29581bc6a050257a0b6e8970a5553 (diff)
add method to safe commands to file
-rwxr-xr-xgnuplot.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnuplot.py b/gnuplot.py
index aa9e26b..737e909 100755
--- a/gnuplot.py
+++ b/gnuplot.py
@@ -213,6 +213,11 @@ class Plot(object):
213 def gnuplot_exec(self): 213 def gnuplot_exec(self):
214 pipe2gnuplot(self.gnuplot_commands()) 214 pipe2gnuplot(self.gnuplot_commands())
215 215
216 def gnuplot_save(self, fname):
217 f = open(fname, 'w')
218 f.write(str(self.gnuplot_commands()))
219 f.close()
220
216def gnuplot_cmd(graphs, title=None, ylabel=None, xlabel=None, 221def gnuplot_cmd(graphs, title=None, ylabel=None, xlabel=None,
217 format='show', term_opts=None, 222 format='show', term_opts=None,
218 style='linespoints', xrange=None, 223 style='linespoints', xrange=None,