set terminal qt font "Arial,23" size 1000,1200 dashed enhanced

set colors classic

set key box lw 2.5 font "Arial,18" maxrow 6 at graph 0.98, 0.45 samplen 1.3 spacing 0.9 width -1.0
set key nobox
set multiplot


set rmargin 0 ; set lmargin 0 ; set tmargin 0 ; set bmargin 0

set xrange[638.5:646]
set mxtics 5
set xtics 5 offset 0.0,0.0
set xtics nomirror
#set noxtics

set yrange[-0.175:0.175]
set ytics  0.1 offset 0.0,0.0
set format y "%2.1f"
set mytics 4
set ytics nomirror

set border linewidth 3.0
unset ylabel

a=1
b=1
p=642.76
#---------------------------------
set size   0.38, 0.28
set origin 0.15, 0.66

#set format x "%2.0f"
set format x ""

unset label
set label 1 at graph 0.75,0.85 "(a)" font 'Arial,32'
#set label 2 at graph 0.35,1.10 "k || L" font 'Arial,32'
#set label 3 at graph 0.07,0.12 "x 4" font 'Arial,28'

unset xlabel
set ylabel 'Mn L_{3}-edge XMCD intensity' offset 1.00,-9.5 font 'Arial,30'


plot "data/no_SOC_CV/kparal/deg0.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  7 title '45°',\
     "data/no_SOC_CV/kparal/deg5.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  2 title '40°',\
     "data/no_SOC_CV/kparal/deg10.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  3 title '35°',\
     "data/no_SOC_CV/kparal/deg15.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  4 title '30°',\
     "data/no_SOC_CV/kparal/deg20.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  5 title '25°',\
     "data/no_SOC_CV/kparal/deg25.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "orange" title '20°',\
     "data/no_SOC_CV/kparal/deg30.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  9 title '15°',\
     "data/no_SOC_CV/kparal/deg35.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "web-green"   title '10°',\
     "data/no_SOC_CV/kparal/deg40.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "dark-violet" title '5°',\
     "data/no_SOC_CV/kparal/deg45.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  1 title '0°'

#plot "kparal/deg0.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  7 title '0°',\
#     "kparal/deg5.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  2 title '5°',\
#     "kparal/deg10.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  3 title '10°',\
#     "kparal/deg15.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  4 title '15°',\
#     "kparal/deg20.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  5 title '20°',\
#     "kparal/deg25.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "orange" title '25°',\
#     "kparal/deg30.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  9 title '30°',\
#     "kparal/deg35.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "web-green"   title '35°',\
#     "kparal/deg40.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "dark-violet" title '40°',\
#     "kparal/deg45.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  1 title '45°'

#---------------------------------
set size   0.38, 0.28
set origin 0.53, 0.66

#set format y ""
set noytics

unset label
set label 1 at graph 0.75,0.85 "(b)" font 'Arial,32'
#set label 2 at graph 0.35,1.10 "k perp L" font 'Arial,32'

unset xlabel
unset ylabel

plot "data/no_SOC_CV/kperp/deg0.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  7 notitle '0',\
     "data/no_SOC_CV/kperp/deg5.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  2 notitle '5',\
     "data/no_SOC_CV/kperp/deg10.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  3 notitle '10',\
     "data/no_SOC_CV/kperp/deg15.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  4 notitle '15',\
     "data/no_SOC_CV/kperp/deg20.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  5 notitle '20',\
     "data/no_SOC_CV/kperp/deg25.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "orange" notitle '25',\
     "data/no_SOC_CV/kperp/deg30.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  9 notitle '30',\
     "data/no_SOC_CV/kperp/deg35.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "web-green"   notitle '35',\
     "data/no_SOC_CV/kperp/deg40.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "dark-violet" notitle '40',\
     "data/no_SOC_CV/kperp/deg45.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  1 notitle '45'

#---------------------------------
set size   0.38, 0.28
set origin 0.15, 0.38

set ytics  0.1 offset 0.0,0.0
set format y "%2.1f"
set mytics 4
set ytics nomirror

#set format x "%2.0f"
set format x ""

unset label
set label 1 at graph 0.75,0.85 "(c)" font 'Arial,32'
#set label 2 at graph 0.35,1.10 "k || L" font 'Arial,32'
#set label 3 at graph 0.07,0.12 "x 4" font 'Arial,28'

unset xlabel
unset ylabel


plot "data/kparal/deg0.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  7 notitle '45°',\
     "data/kparal/deg5.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  2 notitle '40°',\
     "data/kparal/deg10.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  3 notitle '35°',\
     "data/kparal/deg15.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  4 notitle '30°',\
     "data/kparal/deg20.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  5 notitle '25°',\
     "data/kparal/deg25.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "orange" notitle '20°',\
     "data/kparal/deg30.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  9 notitle '15°',\
     "data/kparal/deg35.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "web-green"   notitle '10°',\
     "data/kparal/deg40.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "dark-violet" notitle '5°',\
     "data/kparal/deg45.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  1 notitle '0°'

#plot "kparal/deg0.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  7 title '0°',\
#     "kparal/deg5.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  2 title '5°',\
#     "kparal/deg10.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  3 title '10°',\
#     "kparal/deg15.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  4 title '15°',\
#     "kparal/deg20.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  5 title '20°',\
#     "kparal/deg25.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "orange" title '25°',\
#     "kparal/deg30.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  9 title '30°',\
#     "kparal/deg35.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "web-green"   title '35°',\
#     "kparal/deg40.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "dark-violet" title '40°',\
#     "kparal/deg45.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  1 title '45°'

#---------------------------------
set size   0.38, 0.28
set origin 0.53, 0.38

#set format y ""
set noytics

unset label
set label 1 at graph 0.75,0.85 "(d)" font 'Arial,32'
#set label 2 at graph 0.35,1.10 "k perp L" font 'Arial,32'

unset xlabel
unset ylabel

plot "data/kperp/deg0.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  7 notitle '0',\
     "data/kperp/deg5.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  2 notitle '5',\
     "data/kperp/deg10.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  3 notitle '10',\
     "data/kperp/deg15.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  4 notitle '15',\
     "data/kperp/deg20.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  5 notitle '20',\
     "data/kperp/deg25.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "orange" notitle '25',\
     "data/kperp/deg30.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  9 notitle '30',\
     "data/kperp/deg35.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "web-green"   notitle '35',\
     "data/kperp/deg40.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  rgb "dark-violet" notitle '40',\
     "data/kperp/deg45.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  1 notitle '45'

#---------------------------------
set size   0.38, 0.28
set origin 0.15, 0.10

set ytics  0.1 offset 0.0,0.0
set format y "%2.1f"
set mytics 4
set ytics nomirror

set format x "%2.0f"
set format y "%2.1f"

unset label
set label 1 at graph 0.75,0.85 "(e)" font 'Arial,32'
#set label 2 at graph 0.35,1.10 "k || L" font 'Arial,32'
#set label 3 at graph 0.07,0.12 "x 4" font 'Arial,28'

set xlabel 'Energy (eV)'      offset 11.5, 0.2 font 'Arial,30'

plot "data/kparal/deg5.dat"   u ($1+p):($3*(-0.35)*b/sin(2*pi/180*5) ) w l lw 3.0 lc  2 notitle '5',\
     "data/kparal/deg10.dat"  u ($1+p):($3*(-0.35)*b/sin(2*pi/180*10)) w l lw 3.0 lc  3 notitle '10',\
     "data/kparal/deg15.dat"  u ($1+p):($3*(-0.35)*b/sin(2*pi/180*15)) w l lw 3.0 lc  4 notitle '15',\
     "data/kparal/deg20.dat"  u ($1+p):($3*(-0.35)*b/sin(2*pi/180*20)) w l lw 3.0 lc  5 notitle '20',\
     "data/kparal/deg25.dat"  u ($1+p):($3*(-0.35)*b/sin(2*pi/180*25)) w l lw 3.0 lc  rgb "orange" notitle '25',\
     "data/kparal/deg30.dat"  u ($1+p):($3*(-0.35)*b/sin(2*pi/180*30)) w l lw 3.0 lc  9 notitle '30',\
     "data/kparal/deg35.dat"  u ($1+p):($3*(-0.35)*b/sin(2*pi/180*35)) w l lw 3.0 lc  rgb "web-green"   notitle '35',\
     "data/kparal/deg40.dat"  u ($1+p):($3*(-0.35)*b/sin(2*pi/180*40)) w l lw 3.0 lc  rgb "dark-violet" notitle '40',\
     "data/kparal/deg45.dat"  u ($1+p):($3*(-0.35)*b/sin(2*pi/180*45)) w l lw 3.0 lc  1 notitle '45'

# "kparal/deg0.dat"   u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  7 notitle '0',\

#---------------------------------
set size   0.38, 0.28
set origin 0.53, 0.10

#set format y ""
set noytics

unset label
set label 1 at graph 0.75,0.85 "(f)" font 'Arial,32'
#set label 2 at graph 0.35,1.10 "k perp L" font 'Arial,32'

unset xlabel
unset ylabel

plot "data/kperp/deg0.dat"   u ($1+p):($3*(-0.35)*b/cos(2*pi/180*0) ) w l lw 3.0 lc  7 notitle '0',\
     "data/kperp/deg5.dat"   u ($1+p):($3*(-0.35)*b/cos(2*pi/180*5) ) w l lw 3.0 lc  2 notitle '5',\
     "data/kperp/deg10.dat"  u ($1+p):($3*(-0.35)*b/cos(2*pi/180*10)) w l lw 3.0 lc  3 notitle '10',\
     "data/kperp/deg15.dat"  u ($1+p):($3*(-0.35)*b/cos(2*pi/180*15)) w l lw 3.0 lc  4 notitle '15',\
     "data/kperp/deg20.dat"  u ($1+p):($3*(-0.35)*b/cos(2*pi/180*20)) w l lw 3.0 lc  5 notitle '20',\
     "data/kperp/deg25.dat"  u ($1+p):($3*(-0.35)*b/cos(2*pi/180*25)) w l lw 3.0 lc  rgb "orange" notitle '25',\
     "data/kperp/deg30.dat"  u ($1+p):($3*(-0.35)*b/cos(2*pi/180*30)) w l lw 3.0 lc  9 notitle '30',\
     "data/kperp/deg35.dat"  u ($1+p):($3*(-0.35)*b/cos(2*pi/180*35)) w l lw 3.0 lc  rgb "web-green"   notitle '35',\
     "data/kperp/deg40.dat"  u ($1+p):($3*(-0.35)*b/cos(2*pi/180*40)) w l lw 3.0 lc  rgb "dark-violet" notitle '40'

#     "kperp/deg45.dat"  u ($1+p):($3*(-0.35)*b) w l lw 3.0 lc  1 notitle '45'

unset multiplot