Created
May 22, 2010 18:12
-
-
Save drio/410254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
set -e | |
#set -x | |
help() | |
{ | |
[ ".$1" != "." ] && echo "ERROR: $1" | |
cat<<EOF | |
Usage: | |
$0 <data_f> | |
EOF | |
exit 1 | |
} | |
data_f=$1 | |
[ ".$data_f" == "." ] && help | |
plot() | |
{ | |
root=$1 | |
col=$2 | |
cfg_f="./.tmp.$$.txt" | |
( | |
cat <<-EOF | |
set datafile separator "," | |
set nokey | |
set terminal png nocrop size 1000,600 | |
set xdata time | |
set timefmt "%Y-%m-%d %H:%M" | |
set t png | |
#set yrange [0:25] | |
set output "output/${root}.png" | |
set ylabel "Time computing: ${root}" | |
set title "bfast processing across SEAs (${root})" | |
plot "${data_f}" using 1:${col} | |
EOF | |
) > $cfg_f | |
cat $cfg_f | gnuplot | |
rm -f $cfg_f | |
} | |
i=2 | |
mkdir -p plots | |
for r in "load_ref" "load_indexes" "searching" "merging" "elapsed" | |
do | |
plot $r $i | |
i=$[$i+1] | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment