|
From: Jim K. <jek...@kl...> - 2003-10-17 21:11:15
|
I added the code below to termdefs.py to allow hardcopy
to work with pdf. However, I found that to get printout
without an interactive session, I was better off just sending
the appropriate commands to gnuplot and going around hardcopy.
Note that I am using cygwin but with a compiled version of
gnuplot for X11.
I also found that the temporary file was being removed before
the gnuplot process was done with it. Adding a sleep() of a
few seconds made it work but that was kind of a kludge.
Adding a g.gnuplot.gnuplot.close() worked fine since it
causes a wait for the popen() process to exit (if not using
inline). I wonder if there is some way to put this into
the __del__() function at a place where this would happen
naturally? I tried the obvious on Gnuplot but it didn't work.
Jim
This is vs. the CVS archive:
Index: termdefs.py
===================================================================
RCS file: /cvsroot/gnuplot-py/gnuplot-py/termdefs.py,v
retrieving revision 2.4
diff -u -r2.4 termdefs.py
--- termdefs.py 21 Apr 2003 09:44:09 -0000 2.4
+++ termdefs.py 17 Oct 2003 20:25:40 -0000
@@ -386,6 +386,21 @@
BareStringArg(argname='fontsize'),
]
+terminal_opts['pdf'] = [
+ KeywordOrBooleanArg(
+ options=['landscape', 'portrait', 'eps', 'default'],
+ argname='mode',
+ ),
+ KeywordOrBooleanArg(options=['color', 'monochrome']),
+ KeywordOrBooleanArg(options=['solid', 'dashed']),
+ KeywordOrBooleanArg(
+ options=['defaultplex', 'simplex', 'duplex'],
+ argname='duplexing',
+ ),
+ StringArg(argname='fontname'),
+ BareStringArg(argname='fontsize'),
+ ]
+
terminal_opts['png'] = [
KeywordOrBooleanArg(
options=['small', 'medium', 'large'],
|