# Gnuplot script file for plotting position data inset with vel data
set term png small
set output 'inset1.png'
set multiplot
# largerscale plot
set size 1,1
set origin 0,0
set title "Comparison of Euler, RK2, and RK4 methods"
set xlabel "time, s"
set ylabel "position with velocity inset"
#set nologscale x
#set notlogscale y
set xr [0:50]
set yr [-10:10]
#set pointsize 1
set bar small
set key on
plot 'oscRK4_1.dat' u 1:2 title 'x(t), RK4' linetype 2 w l, \
'oscRK1.dat' u 1:2 title 'x(t), RK2' linetype 3 w
l, \
'osc1.dat' u 1:2 t 'x(t), Euler' linetype 1 w l
# use inset graphs for vel
set size 0.5,0.3
set origin 0.097,0.61
#set nologscale x
#set nologscale y
set xr[0:50]
set yr [-5:5]
unset key
unset title
unset xlabel
unset ylabel
plot 'osc1.dat' u 1:3 t 'v(t), Euler' linetype 1 w l, \
'oscRK4_1.dat' u 1:3 title 'v(t), RK4' linetype 2
w l, \
'oscRK1.dat' u 1:3 title ' v(t), RK2' linetype 3
w l
unset multiplot