This is an old revision of the document!
The benefit of using a script is that you do not have to retype everything every time you want to make a change or want to reproduce your plot. The following is an example of a Gnuplot script that plots two graphs on a single plot.
reset # flush all the variables set size 1,1 # use default pallet size (100% of width and height) set multiplot #Graph 1 set size 0.5,1 #half the width and full height set origin 0,0 #x,y plot 'data2.txt' w l lw 0.5 #Graph 2 set size 0.5,1 set origin 0.5,0 plot 'data3.txt' w l lw 0.5 unset multiplot
Run the script:
$ gnuplot gnuplot> load 'script_name'