
set terminal pngcairo size 1280,650 dashlength 0.5

set ticslevel 0
#unset key
unset border
unset tics


set key at screen 0.99,0.98
set view equal xy
set view 74,30
set zrange[0:1200]
set key font ",22" spacing +1.45

set output "step1.png"
set multiplot layout 1,1; set size 2.8,2.8; set origin -0.90,-0.41
splot \
	"/tmp/walls.dat" with lines lc rgb "#000000" lw 3 title "floorplan"
unset multiplot
	
set output "step2.png"
set multiplot layout 1,1; set size 2.8,2.8; set origin -0.90,-0.41
splot \
	"/tmp/walls.dat" with lines lc rgb "#000000" lw 3 title "floorplan", \
	"/tmp/nodesFloor.dat" with points pt 7 ps 0.4 lc rgb "#0000ff" title "nodes"
unset multiplot

set output "step3.png"
set multiplot layout 1,1; set size 2.8,2.8; set origin -0.90,-0.41
set object 1 polygon from 1350,750,0 to 1350,1100,0 to 950,1100,0 to 950,750,0 lc rgb "#000000" lw 1.5 front
#set arrow from 1350,750,0 to screen 0.968, 0.395 nohead
#set arrow from 950,1100,0 to screen 0.732, 0.792 nohead
#set arrow from 950,750,0 to screen 0.732, 0.395 nohead
splot \
	"/tmp/walls.dat" with lines lc rgb "#000000" lw 3 title "floorplan", \
	"/tmp/edgesFloor.dat" with lines lc rgb "#999999" title "edges", \
	"/tmp/nodesFloor.dat" with points pt 7 ps 0.4 lc rgb "#4444ff" title "nodes"
unset object 1
unset arrow
set size 0.8,0.8; set origin +0.45,+0.18
set xrange[300:700]
set yrange[300:700]
set zrange[0:100]
set border
set view 0, 0
set view equal xy
splot \
	"/tmp/edgesFloor.dat" with lines lc rgb "#999999" notitle, \
	"/tmp/nodesFloor.dat" with points pt 7 ps 0.5 lc rgb "#0000ff" notitle, \
	"/tmp/walls.dat" with lines lc rgb "#000000" lw 9 notitle
unset xrange; unset yrange; unset zrange;
unset multiplot
unset view
unset border
set zrange[0:1200]; set view equal xy; set view 74,30

set output "step4.png"
set multiplot layout 1,1; set size 2.8,2.8; set origin -0.90,-0.41
set object 1 polygon from 1680,750,2 to 1680,895,2 to 980,895,398 to 980,750,398 fs transparent solid 0.75 fc rgb "#ffffff" front
splot \
	"/tmp/edgesFloorS.dat" with lines lc rgb "#999999" notitle, \
	"/tmp/nodesFloorS.dat" with points pt 7 ps 0.4 lc rgb "#4444ff"notitle , \
	"/tmp/walls.dat" with lines lc rgb "#000000" lw 3 notitle
set size 2.8,2.8; set origin -0.90,-0.41
unset object 1
splot \
	"/tmp/edgesStair.dat" with lines lc rgb "#999999" notitle, \
	"/tmp/nodesStair.dat" with points pt 7 ps 0.4 lc rgb "#4444ff" notitle, \
	"/tmp/walls.dat" with lines lc rgb "#000000" lw 3 title "floorplan"
#	"-" using 1:2:3:4 with pm3d fc rgb "#000000"
#	1650 750 10 1
#	1650 920 10 1
#	1000 920 390 1
#	1000 750 390 1
#	1650 750 10 1
#	e
	
unset multiplot



set output "step5.png"

set multiplot layout 1,1; set size 2.8,2.8; set origin -0.90,-0.41
set cbrange[0.2:1.5]

set pm3d;
#set palette gray;
call "/tmp/nodesFloorImpPoly.dat"

set label 1 center at screen 0.95, 0.835 "likely" font ",20"
set label 2 center at screen 0.95, 0.37 "unlikely" font ",20"

set colorbox user origin graph 0.94, 0.4 size 0.02, 0.4
splot \
	"/tmp/walls.dat" with lines lc rgb "#000000" lw 3 title "floorplan"
unset multiplot
unset object
unset colorbox
unset label

set output "path1.png"
set multiplot layout 1,1; set size 2.8,2.8; set origin -0.90,-0.41
splot \
	"/tmp/edgesAll.dat" with lines lc rgb "#cccccc" notitle, \
	"/tmp/nodesAll.dat" with points pt 7 ps 0.3 lc rgb "#777777" notitle, \
	"/tmp/walls.dat" with lines lc rgb "#000000" lw 3 title "floorplan", \
	"/tmp/path1.dat" with lines lw 4 lc rgb "#0000ff" title "shortest path"
unset multiplot


set output "path2.png"
set multiplot layout 1,1; set size 2.8,2.8; set origin -0.90,-0.41
splot \
	"/tmp/edgesAll.dat" with lines lc rgb "#cccccc" notitle, \
	"/tmp/nodesAll.dat" with points pt 7 ps 0.3 lc rgb "#777777" notitle, \
	"/tmp/walls.dat" with lines lc rgb "#000000" lw 3 title "floorplan", \
	"/tmp/path1.dat" with lines lw 4 lc rgb "#0000ff" title "shortest path", \
	"/tmp/path2.dat" with lines lw 4 lc rgb "#009900" title "mod. shortest path"
unset multiplot
