]> rtime.felk.cvut.cz Git - hubacji1/iamcar2.git/blob - scripts/plot_all_scenarios.sh
Update scenario script (lib)
[hubacji1/iamcar2.git] / scripts / plot_all_scenarios.sh
1 # Plot all results from arguments
2 #
3 # This script should be run from the `build` folder as:
4 #
5 #       bash ../scripts/plot_all_scenarios.sh r_test1 r_test2 r_test3 ...
6 #
7 SF=../scripts
8
9 if [ $# -eq 0 ]
10 then
11         echo 'Plot all results from arguments'
12         echo ''
13         echo 'Usage:'
14         echo ''
15         echo -e '\tbash plot_all_scenarios.sh r_test1 r_test2 r_test3 ...'
16         exit 1
17 fi
18
19 i=1
20 while (( "$#" ))
21 do
22         python3 $SF/print_json_objects_scenaris_statistics.py $1 > stats_$i
23         python3 $SF/print_json_objects_scenaris_histograms.py $1 > hist_$i
24         python3 $SF/print_json_objects_scenaris_data.py $1
25
26         cp data_cost_$1 data_cost
27         cp data_time_$1 data_time
28         gnuplot $SF/plot_statistics_cost.pl
29         mv out.eps cost_$1.eps
30         gnuplot $SF/plot_statistics_time.pl
31         mv out.eps time_$1.eps
32
33         i=$(( i + 1 ))
34         shift
35 done
36
37 sed -i 's/sc\([0-9]\+_[0-9]\+\)\.json/\1/g' stats_*
38 sed -i 's/sc\([0-9]\+_[0-9]\+\)\.json/\1/g' hist_*
39
40 gnuplot $SF/plot_statistics_error.pl
41 mv out.eps error.eps