set terminal epslatex rounded size 3.5,2.3
set output "path_nexus_detail.tex"

unset xtics
unset ytics
unset ztics
unset border
unset colorbox
set ticslevel 0

set view equal xy
set zrange [-200:2000]

set key at screen 0.295,0.16 samplen 1.2 box opaque width -7.1

set view 72,50
#set object 1 polygon from 1000,4200,1060 to 1000,5200,1060 to 1700,5200,1060 to 1700,4200,1060 fs solid noborder fc rgb "#cccccc" behind

set cbrange[0:1]
set palette gray

ca = 0.8
cb = 0.4

# coloring for path4
f4(c) =	c/2<14		? ca\
		:c/2<36		? cb\
		:c/2<54		? ca\
		:c/2<65		? cb\
		:c/2<74		? ca\
		:c/2<105	? cb\
		:c/2<116	? ca\
		:c/2<130	? cb\
		:c/2<142	? ca\
					 :cb

# init error 1
set object 1 polygon from 1000,400,1060 to 1000,1500,1060 to 1300,1500,1060 to 1300,400,1060 fs solid noborder fc rgb "#ff8888" behind

# shorter 1
set arrow 1 from 1340, 3180, 1060 to 1340, 4050, 720 nohead lw 2 lc rgb "#00aa00" front
set arrow 2 from 1340, 4050, 720 to 1740, 4090, 720 nohead lw 2 lc rgb "#00aa00" front

# shorter 2
set arrow 3 from 1140, 4442, 1060 to 4180, 4300, 1060 nohead lw 2 lc rgb "#00aa00" front
set arrow 4 from 4180, 4300, 1060 to 5000, 4300, 720 nohead lw 2 lc rgb "#00aa00" front

# multimod
set arrow 5 from 6290, 4778, 190 to 6290, 5098, 190 nohead lw 2 lc rgb "#aa0000" back
set arrow 6 from 6758,4790+160,380 to 6290, 5098, 190 nohead lw 2 lc rgb "#aa0000"  back 
set arrow 7 from 6290, 4778, 190 to 6758,4790+000, 0 nohead lw 2 lc rgb "#aa0000" back

# numbering
set label 1 "\\footnotesize{1}" at 1692.27, 2721.79, 932.453-70 center front
set label 2 "\\footnotesize{2}" at 1086.04, 2622.65, 1058.51+60 center front
set label 3 "\\footnotesize{3}" at 1125.9, 3958.11, 1059.91+60 center front
set label 98 "\\footnotesize{3'}" at 1340+250, 3580+50, 1060-130 center front
set label 99 "\\footnotesize{3''}" at 4180, 4300, 1060+50 center front
set label 4 "\\footnotesize{4}" at 1843.27, 5037.33, 880.035 center front
set label 5 "\\footnotesize{5}" at 1174.22-400, 4646.68+200, 719.775 center front
set label 6 "\\footnotesize{6}" at 3347.93, 4112.19, 720-70 center front
set label 7 "\\footnotesize{7}" at 5724.6+250, 4159.7+150, 604.967 center front
set label 8 "\\footnotesize{8}" at 6964.14-180, 4132.79-180, 373.646-50 center front
set label 9 "\\footnotesize{9}" at 7077.86-150, 4235.71-150, 114.833 center front
set label 10 "\\footnotesize{10}" at 7168.42-600, 3853.84, 0 center front

set multiplot layout 1,1 scale 2.57,2.57 offset 0,0.12


splot \
	"data/floors.dat"  with lines lc rgb "#cccccc" notitle,\
	"data/est_bergwerk_path4_nexus_multi.dat" using 1:2:3:(f4(column(0))) with lines lw 8 palette notitle,\
	"data/est_bergwerk_path4_nexus_multi.dat" with lines lw 2 lc rgb "#0000cc" title "\\footnotesize{multi}",\
	"data/path4.dat" with lines title "\\footnotesize{ground truth}" dashtype 3 lw 2 lc rgb "#000000" 
	
unset multiplot
