set preamble "\usepackage{amsmath}"

set width 12*unit(cm) 
#set size ratio 0.35

set axis x arrow nomirrored
set axis y arrow nomirrored
set key above
#set key top left

#set xrange [0:1]
#set yrange [1:1e20]

set grid x1 y1y2

set terminal pdf

set xlabel  "Time~$t$ [hours]"
set y1label "Pressure~$p$ [MPa]"
set y2label "Temperature~$T$ [C]"

set output "pt-1.pdf"
plot \
     "pt-1.dat" u 1:3 w lp lt 1 lw 2 pt 17 color green axes x1y1 ti "Pressure [MPa]",\
     "pt-1.dat" u 1:2 w lp lt 1 lw 2 pt 16 color red   axes x1y2 ti "Temperature [C]"

set output "pt-2.pdf"
plot \
     "pt-2.dat" u 1:3 w lp lt 1 lw 2 pt 17 color green axes x1y1 ti "Pressure [MPa]",\
     "pt-2.dat" u 1:2 w lp lt 1 lw 2 pt 16 color red   axes x1y2 ti "Temperature [C]"
     
