#set label "ISSC TLP modeled with 42 elements" at 5,  center


set xrange [3:27]
set samples 10000
set xlabel "Wave Period (sec)"
set ylabel "F (N)"
set title "Wave exciting force in surge, sway, and heave motions"
plot 'forces.dat' using "%lf%lf" title "Surge", "forces.dat" using "%lf%*lf%lf"  title "Sway", 'forces.dat' using "%lf%*lf%*lf%lf"  title "Heave", 'forces.dat' using "%lf%lf" title "" with lines 1, "forces.dat" using "%lf%*lf%lf" title "" with lines 1, 'forces.dat' using "%lf%*lf%*lf%lf" title "" with lines 1

pause -1 "Hit return to continue"
set ylabel "M (N-m)"
set title "Wave exciting force in roll, pitch and yaw motions"
plot 'forces.dat' using "%f%*f%*f%*f%f" title "Roll", 'forces.dat' using "%f%*f%*f%*f%*f%f" title "Pitch", 'forces.dat' using "%f%*f%*f%*f%*f%*f%f" title "Yaw", 'forces.dat' using "%f%*f%*f%*f%f" title "" with lines 1, 'forces.dat' using "%f%*f%*f%*f%*f%f" title "" with lines 1, 'forces.dat' using "%f%*f%*f%*f%*f%*f%f" title "" with lines 1

pause -1 "Hit return to continue"
set title "Phase angle of wave exiting forces in surge, sway, and heave"
set ylabel "Degrees"
plot 'phase.dat' using "%f%f" title "Surge", 'phase.dat' using "%f%*f%f"  title "Sway", 'phase.dat' using "%f%*f%*f%f"  title "Heave"#, 'phases.dat' using "%f%f" title "" with lines, "phases.dat" using "%f%*f%f"  title "" with lines, 'phases.dat' using "%f%*f%*f%f"  title "" with lines

pause -1 "Hit return to continue"
set title "Phase angle of wave exiting forces in roll, pitch, and yaw"
plot 'phase.dat' using "%f%*f%*f%*f%f" title "Roll", 'phase.dat' using "%f%*f%*f%*f%*f%f" title "Pitch", 'phase.dat' using "%f%*f%*f%*f%*f%*f%f" title "Yaw"
#, 'phases.dat' using "%f%*f%*f%*f%f" title "" with lines, 'phases.dat' using "%f%*f%*f%*f%*f%f" title "" with lines, 'phases.dat' using "%f%*f%*f%*f%*f%*f%f" title "" with lines

set nokey
set ylabel "M"

pause -1 "Hit return to continue"
set title "Added mass coefficient of surge motion"
plot 'am.dat', 'am.dat' with lines 1

pause -1 "Hit return to continue"
set title "Added mass coefficient of sway motion"
plot 'am.dat' using "%f%*f%f", 'am.dat' using "%f%*f%f" with lines 1

pause -1 "Hit return to continue"
set title "Added mass coefficient of heave motion"
plot 'am.dat' using "%f%*f%*f%f", 'am.dat' using "%f%*f%*f%f" with lines 1

pause -1 "Hit return to continue"
set title "Added mass coefficient of roll motion"
plot 'am.dat' using "%f%*f%*f%*f%f", 'am.dat' using "%f%*f%*f%*f%f" with lines 1

pause -1 "Hit return to continue"
set title "Added mass coefficient of pitch motion"
plot 'am.dat' using "%f%*f%*f%*f%*f%f", 'am.dat' using "%f%*f%*f%*f%*f%f" with lines 1

pause -1 "Hit return to continue"
set title "Added mass coefficient of yaw motion"
plot 'am.dat' using "%f%*f%*f%*f%*f%*f%f", 'am.dat' using "%f%*f%*f%*f%*f%*f%f" with lines 1


set ylabel "N"

pause -1 "Hit return to continue"
set title "Damping coefficient of surge motion"
plot 'dmp.dat' using "%f%f", 'dmp.dat' using "%f%f" with lines 1

pause -1 "Hit return to continue"
set title "Damping coefficient of sway motion"
plot 'dmp.dat' using "%f%*f%f", 'dmp.dat' using "%f%*f%f" with lines 1

pause -1 "Hit return to continue"
set title "Damping coefficient of heave motion"
plot 'dmp.dat' using "%f%*f%*f%f", 'dmp.dat' using "%f%*f%*f%f" with lines 1


pause -1 "Hit return to continue"
set title "Damping coefficient of roll motion"
plot 'dmp.dat' using "%f%*f%*f%*f%f", 'dmp.dat' using "%f%*f%*f%*f%f" with lines 1

pause -1 "Hit return to continue"
set title "Damping coefficient of pitch motion"
plot 'dmp.dat' using "%f%*f%*f%*f%*f%f", 'dmp.dat' using "%f%*f%*f%*f%*f%f" with lines 1

pause -1 "Hit return to continue"
set title "Damping coefficient of yaw motion"
plot 'dmp.dat' using "%f%*f%*f%*f%*f%*f%f", 'dmp.dat' using "%f%*f%*f%*f%*f%*f%f" with lines 1

pause -1 "Hit return to continue"
