set terminal postscript eps enhanced color lw 2 "Helvetica" 24
set border lw 0.75
set style line 1 lw 2 lt 1 lc rgb '#ee0000'
set style line 2 lw 2 lt 1 lc rgb 'dark-green'
set style line 3 lw 2 lt 1 lc rgb 'medium-blue'
set style line 4 lw 2 lt 1 lc rgb 'brown4'
set style line 5 lw 2 lt 1 lc rgb 'plum'
set style line 6 lw 2 lt 1 lc rgb 'light-green'
set style line 7 lw 2 lt 1 lc rgb 'skyblue'
set style line 8 lw 2 dt 1 lc rgb 'orange'
set style line 9 lw 2 dt 1 lc rgb 'gold'
set style line 10 lw 2 dt 1 lc rgb 'grey80'

set style increment user

unset title
set key bottom right
set size 1,1
set title font ",32"

set output 'dx_rc_x.eps'
set title "Horizontally displaced dipole:\nREFERENCE\\\_CORRECTION=1"
set key bottom right
set xlabel 's (m)'
set ylabel 'x (mm), shifted by dx'
plot \
 'dipole_dx_rc000_orbit.txt' u 1:($2*1000) w lp pt 1 t 'dx=0', \
 'dipole_dx_rc010_orbit.txt' u 1:(($2-10.e-4)*1000) w lp pt 2 t 'dx=1.e-3',\
 'dipole_dx_rc020_orbit.txt' u 1:(($2-20.e-4)*1000) w lp pt 3 t 'dx=2.e-3',\
 'dipole_dx_rc040_orbit.txt' u 1:(($2-40.e-4)*1000) w lp pt 4 t 'dx=4.e-3'

set output 'dx_rc_xp.eps'
set title "Horizontally displaced dipole:\nREFERENCE\\\_CORRECTION=1"
set key top right
set xlabel 's (m)'
set ylabel 'xp (mrad)'
plot \
 'dipole_dx_rc000_orbit.txt' u 1:($3*1000) w lp pt 1 t 'dx=0', \
 'dipole_dx_rc010_orbit.txt' u 1:($3*1000) w lp pt 2 t 'dx=1.e-3',\
 'dipole_dx_rc020_orbit.txt' u 1:($3*1000) w lp pt 3 t 'dx=2.e-3',\
 'dipole_dx_rc040_orbit.txt' u 1:($3*1000) w lp pt 4 t 'dx=4.e-3'
