set terminal postscript eps color enhanced font "Helvetica,16pt" size 8cm,9cm dashlength 2.0 set output "trendsun2.eps" # This code does a multiplot with time and elevation separately set multiplot # common settings src='g2trend.txt' set xrange [0:360] set xtics 60 # Do fit for average value: S(x)=s s=1.7 set fit errorvariables FIT_LIMIT=1.e-15 FIT_MAXITER=1000 fit S(x) src using ($1*4):5:6 via s # top plot: Elevation vs. time set origin 0,0.6 set size 1,0.4 set format x "" set format y "%3g" set yrange [20:70] set ylabel "Elevation {/Symbol a} [degree]" plot src using ($1*4):4 w l notitle # bottom plot: G(2) vs. time set origin 0,0 set size 1,0.65 set format y "%2.1f" set format x "%g" set ytics 0.1 set ylabel "g^{(2)}({/Symbol t}=0)" rotate by 90 set xlabel "Time after 11:36am [Minutes]" set yrange [1.525:1.875] set samples 1000 plot src using ($1*4):5:6 w yerrorbars lc 1 ps 0.8 pt 7 notitle,\ S(x) w l lw 3 lt 2 lc -1 notitle