diff options
Diffstat (limited to 'plot_dist')
-rwxr-xr-x | plot_dist | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/plot_dist b/plot_dist new file mode 100755 index 0000000..18cb48c --- /dev/null +++ b/plot_dist | |||
@@ -0,0 +1,30 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | CSV1=$1 | ||
4 | CSV2=$2 | ||
5 | OUT=$3 | ||
6 | TITLE=$4 | ||
7 | |||
8 | if [ ! -f "$CSV1" ] || [ ! -f "$CSV2" ] || | ||
9 | [ "" == "$OUT" ] ; then | ||
10 | echo "Usage: plot_dist <normal.csv> <cumulative.csv> <out.png> <title>" | ||
11 | exit 1 | ||
12 | fi | ||
13 | |||
14 | gnuplot <<EOM | ||
15 | set terminal png picsize 1024 768 | ||
16 | set out '/dev/null' | ||
17 | plot '$CSV1' title 'distribution' with lines | ||
18 | replot '$CSV2' title 'distribution (cumulative)' axes x1y2 with lines | ||
19 | set ylabel 'probability' | ||
20 | set y2label 'probability (cumulative)' | ||
21 | set xlabel 'overhead (in us)' | ||
22 | set y2tics | ||
23 | set y2range [0.0:1.0] | ||
24 | set title '$TITLE' | ||
25 | set key top left | ||
26 | set out '$OUT' | ||
27 | replot | ||
28 | set out | ||
29 | EOM | ||
30 | |||