#!/opt/local/bin/gnuplot -persist

set xrange[1:81]
set terminal png size 950,800
set output 'test_results.png'

#set title "Solve Time vs. the Number of Objective Functions" font "Times-Roman, 20"
set xlabel "# of Objective Functions" font "Times-Roman, 16"
set ylabel "Time (seconds)"  font "Times-Roman, 16"

set key at graph .5, .9 spacing 4 font "Times-Roman, 16"
set key box lt -1 lw 1 
set key width 3
set key height 0.3

#set boxwidth 1.2 absolute

set style line 1 lt 3 lw 1 lc rgb '#990042'

#=======================================================
# Style #1 whiskers
#=======================================================
#plot 'test_results.dat'  using 1:3:2:6:5 with candlesticks title "time (secs)" whiskerbars ls 1

#set boxwidth 0.35 relative
#plot 'test_results.dat'  using 1:3:2:6:5 with candlesticks whiskerbars 0.5

#=======================================================
# Style #2A Simple average (No Error Bars)
#=======================================================
#plot 'test_results_v4.dat'  using 1:4 with linespoints title 'RIPAL Version 4' pt 4,   #     'test_results_v5.dat'  using 1:4 with linespoints title 'RIPAL Version 5' pt 5 

#=======================================================
# Style #2B Simple average (V4 has Error Bars)
#=======================================================
plot 'test_results_v4.dat'  using 1:4 with linespoints title 'RIPAL Version 4' pt 5,         'test_results_v5.dat'  using 1:4:3:5 title 'RIPAL Version 5' pt 4 with yerrorbars,      NaN title '2 Dimensions' lt rgb "white",      NaN title '6000 Pieces per IvP Function' lt rgb "white"

#=======================================================
# Style #3 Simple average (Boxes)
#=======================================================
#set boxwidth 0.6 relative
plot 'test_results_v4.dat'  using 1:4 with boxes fs solid 0.55,      'test_results_v5.dat'  using 1:4 with boxes fs solid 0.85