set output "filename" This command will re-direct the output to file "filename" |
set output This command will reset the output to STDOUT (terminal) |
In our X-window UNIX workstation, this format is X11
set terminal // Give a list of supported format set terminal postscript portrait color // Postscript color (good for figures in research paper) set terminal gif size 800,600 // Postscript color (good for figures in research paper) |
set terminal push (save current output format) |
set terminal pop (restore the saved output format) |
column 1 column 2 column 3 .... ------------------------------------------------ 0 4 5 ... 0.1 4.4 5.3 ... 0.2 4.6 5.8 ... 0.3 4.7 5.9 ... 0.4 4.3 6.3 ... ....... |
plot "input1" using 1:2 title "Plot 1" with lines 1 |
plot "input1" using 1:3 title "Plot 2" with lines 2 |
plot "input1" using 1:2 title "Plot 1" with lines 1, \ "input1" using 1:3 title "Plot 2" with lines 3 |
The replot command is useful after you have changed to OUTPUT device (and possibly the output format also).
Example: suppose you have plotted a graph and now you want the plot as a "gif" file, then do:
set terminal push (save original format setting) set terminal gif size 640,480 (change to new format) set output "out.gif" (set file name for output) replot (save gif plot in file) set terminal pop (restore original format setting) |