Generating postscript with gnuplot


Execute the following:
( echo set term postscript default color ; echo plot \"FILE1\", \"FILE2\", \"FILE3\", \"FILE4\" ) | gnuplot > plot.ps
where FILEx is one of the input files and plot.ps is the output file. The first command (before the semicolon) tells gnuplot what the plot's format should be, and the second command tells it what to plot (the two commands are sent simultaneously to gnuplot as a batch; of course, you may execute these interactively as well). Each point to be plotted in FILEx must be on its own line. Since plot is a 2D plot command, that means that FILEx must have two real numbers per line.

If you want to use other options, such as having lines connect the points (to make learning curves) or to output eps rather than ps, check the online help of gnuplot. E.g. ``help set term'' and then choose ``postscript'' as a subtopic will give help on generating grayscale ps files and also eps files. ``help plot'' will give help on plotting options, including connecting points with lines.


Back

Last modified 05 August 2003; please report problems to sscott at cse.unl.edu.