]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/blob - scripts/generate_plots.sh
Fix init in plot json scenario script
[hubacji1/iamcar2.git] / scripts / generate_plots.sh
1 #!/bin/bash
2
3 # The brief documentation about test process.
4 #
5 # 1. Run `test_all_...` script to run the tests.
6 # 2. Print the results with `print_...` to `stats` and `hist` files.
7 # 3. Plot the figures with `generate_plots` (this file).
8 #
9
10 if [ $# -ne 1 ]
11 then
12         echo "./generate_histograms.sh PLANNER"
13         exit 1
14 fi
15 planner=$1
16 pdir="p_${planner}"
17 mkdir $pdir
18 w=(time iterations cost cusps-in-path connecteds-in-path nodes)
19 f=(sc1_0 sc1_1 sc2_4)
20 WHATS=${#w[@]}
21 FILES=${#f[@]}
22 i=0
23 while [ $i -lt $WHATS ]
24 do
25         j=0
26         while [ $j -lt $FILES ]
27         do
28                 what=${w[$i]}
29                 file=${f[$j]}
30                 c1=$(( 2 * $WHATS * $j + 2 * $i + 1 ))
31                 c2=$(( 2 * $WHATS * $j + 2 * $i + 2))
32                 t="$what $file $planner histogram"
33                 gnuplot -e "c1=$c1;c2=$c2;tit='$t'" ../scripts/plot_histogram.pl
34                 mv out.eps $pdir/h_${what}_${file}_${planner}.eps
35                 j=$(( $j + 1 ))
36         done
37         gnuplot ../scripts/plot_statistics_${w[$i]}.pl
38         mv out.eps $pdir/s_${w[$i]}_${planner}.eps
39         gnuplot ../scripts/plot_statistics_error.pl
40         mv out.eps $pdir/s_error_${planner}.eps
41         i=$(( $i + 1 ))
42 done