blob: 18cb48c262a2138d2945c6c2b817d0d512eaed14 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/bash
CSV1=$1
CSV2=$2
OUT=$3
TITLE=$4
if [ ! -f "$CSV1" ] || [ ! -f "$CSV2" ] ||
[ "" == "$OUT" ] ; then
echo "Usage: plot_dist <normal.csv> <cumulative.csv> <out.png> <title>"
exit 1
fi
gnuplot <<EOM
set terminal png picsize 1024 768
set out '/dev/null'
plot '$CSV1' title 'distribution' with lines
replot '$CSV2' title 'distribution (cumulative)' axes x1y2 with lines
set ylabel 'probability'
set y2label 'probability (cumulative)'
set xlabel 'overhead (in us)'
set y2tics
set y2range [0.0:1.0]
set title '$TITLE'
set key top left
set out '$OUT'
replot
set out
EOM
|