From 1cc581db8752d2bdf0a1ad6516b57fc506227b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=2E=20Brandenburg?= Date: Tue, 25 May 2010 13:38:36 -0400 Subject: add method to safe commands to file --- gnuplot.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gnuplot.py') 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): def gnuplot_exec(self): pipe2gnuplot(self.gnuplot_commands()) + def gnuplot_save(self, fname): + f = open(fname, 'w') + f.write(str(self.gnuplot_commands())) + f.close() + def gnuplot_cmd(graphs, title=None, ylabel=None, xlabel=None, format='show', term_opts=None, style='linespoints', xrange=None, -- cgit v1.2.2