#!/opt/bin/gnuplot -persist ## template ~/S/gnuplot_plot for gplot, gpgp scripts. ## gplot uses ~/S/gnuplot.sh to replace CAPITALIZED words by strings ## specified in gplot, then does: gnuplot < $dat.gp (using: gpgp) ## Steps to plot a datafile "file": # 1. gplot file :produces file.gp from gnuplot_plot template # 2. vi file.gp :modify as desired (if needed) # 3. gpgp file.gp :creates file.ps and displays it (gv file.ps) # Note: rootname "file" must match: file.gp and file.ps|.png #---------------------- gnuplot settings --------------------------# #... use enhanced for greek,sub/super scripts,symbols #set term postscript portrait enhanced color dashed "Helvetica" 14 set term postscript landscape enhanced color "Helvetica" 14 #set term png truecolor # set output 'OUTPUT' #------------------ settings for xy plots only (see S/gnuplot_plot.all) set zero 1e-06 set grid #set xtics 0,0.5,4 #set mxtics #set ytics 0,0.5,4 #set size square #----------------- time stamp and key: set time #set notime set key #set nokey #------------------------ ranges: #set xrange [0 : 4.0] #set yrange [0.03 : 3.96] ####------------------------------ labels (or/and can use key title) #set label 1 "curve1" at 5, 6 left #set label 2 "curve2" at 7, 8 left set title "TITLE" 0,0 set xlabel "XLABEL" 0,0 set ylabel "YLABEL" 0,0 plot \ "DATA" u COL1:COL2 with lines lt 1 lw 2 # "DATA" u COL1:COL2 with lines lt -1 lc rgb "red" lw 2 ### linetype: black -1,... 0,red 1,grn 2,blu 3,mag 4,cyan 5,brn 6,ora 7 ### key title: set key ; plot "dat" u 1:2 t 'key' ### modified column data: u ($1/1000):($3*100) w lines lt 3 lw 2