aboutsummaryrefslogtreecommitdiffstats
path: root/plot_dist
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-05-24 22:22:46 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-05-24 22:22:46 -0400
commit2ebc9c2eeaeb03df85f21f6c593e64d3b8218658 (patch)
tree5c0ddee0930066de3d44ac207749dd533d8f2766 /plot_dist
extracted the plotting tools from csvtools
Diffstat (limited to 'plot_dist')
-rwxr-xr-xplot_dist30
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
3CSV1=$1
4CSV2=$2
5OUT=$3
6TITLE=$4
7
8if [ ! -f "$CSV1" ] || [ ! -f "$CSV2" ] ||
9 [ "" == "$OUT" ] ; then
10 echo "Usage: plot_dist <normal.csv> <cumulative.csv> <out.png> <title>"
11 exit 1
12fi
13
14gnuplot <<EOM
15set terminal png picsize 1024 768
16set out '/dev/null'
17plot '$CSV1' title 'distribution' with lines
18replot '$CSV2' title 'distribution (cumulative)' axes x1y2 with lines
19set ylabel 'probability'
20set y2label 'probability (cumulative)'
21set xlabel 'overhead (in us)'
22set y2tics
23set y2range [0.0:1.0]
24set title '$TITLE'
25set key top left
26set out '$OUT'
27replot
28set out
29EOM
30