I'd like to know how I can use gnuplot non-interactively.
I know that gnuplot is an interactive plotting program.
Can I also use it non-interactively? (ie, use 'gnuplot' in the script)
I have one more question.
How do I get hard copy output from gnuplot?
Can I print my output to postscript file?
If I can, could you tell me how?
Thanks in advance.
Young C Chang
yoc...@eng.fm.intel.com
--
--------------------------------------------------------------------
Young C. Chang
yoc...@eng.fm.intel.com
Folsom Engineering Services (FES)
Intel Corporation, Folsom, CA
"All opinions stated here are mine, not those of Intel Corporation."
--------------------------------------------------------------------
> I'd like to know how I can use gnuplot non-interactively.
> I know that gnuplot is an interactive plotting program.
> Can I also use it non-interactively? (ie, use 'gnuplot' in the script)
Write your gnuplot commands into a file, and then use its name as an
argument when you invoke gnuplot. For example,
gnuplot command.file
will tell gnuplot to execute the commands in 'command.file'. But beware
that if you are having it write to a window, the window may close before
the plot is drawn. This can be prevented by putting "pause -1" after
each plotting command ("plot", "splot", and "replot"). [In pre-3.6, some
terminals also have the "-persist" option, which leaves the plot window
open when gnuplot itself closes.]
> I have one more question.
> How do I get hard copy output from gnuplot?
> Can I print my output to postscript file?
> If I can, could you tell me how?
There are two commands that govern output. The first, "set terminal",
tells gnuplot what kind of output to generate (PostScript commands,
Windows commands, commands specific to your printer, etc). The second,
"set output", tells gnuplot where to send the commands (to your printer,
your monitor, or a file). Obviously you need to choose a compatible
pair -- you can send Windows commands to a file, but why would you wan
to? Thus, for example,
set terminal postscript
set output "plot.ps"
will generate PostScript commands for all subsequent plots and store them
in the file 'plot.ps'.
gnuplot's "postscript" terminal has several options, which you can read
about in the manual or by typing "help terminal postscript".
"set terminal" without any further arguments will write a list of terminals
available to you on your monitor.
Dick Crawford, aka rccra...@lanl.gov
Any one seen this problem before?
You use gnuplot on a script file that you creat with in the commands you
usually use in the interactive mode. And then just run : gnuplot
script_file.
> My problem is reversed...
> I am using the windows version 3.5. I can use it non-interactively but
> when i try to use it interactively, the window pops open and shuts down
> immediately.
>
> Any one seen this problem before?
add "pause -1;" in your script.
Karim.
---------------------
Contact Information :
www.antd.nist.gov/snad-staff/zamani
Grant.