aboutsummaryrefslogtreecommitdiffstats
path: root/plot_scatter
diff options
context:
space:
mode:
Diffstat (limited to 'plot_scatter')
-rwxr-xr-xplot_scatter42
1 files changed, 29 insertions, 13 deletions
diff --git a/plot_scatter b/plot_scatter
index c92c11a..1a455c5 100755
--- a/plot_scatter
+++ b/plot_scatter
@@ -5,14 +5,31 @@
5# try thinner lines 5# try thinner lines
6NICE="blacktext linewidth 1.0 \"Helvetica\" 16 " 6NICE="blacktext linewidth 1.0 \"Helvetica\" 16 "
7 7
8if [ "$1" == "--eps" ]; then 8EXT="png"
9 EXT="eps" 9TERMINAL="png picsize 1024 768"
10 TERMINAL="postscript color eps $NICE" 10
11 shift 11GRAPH=points
12else 12
13 EXT="png" 13while true; do
14 TERMINAL="png picsize 1024 768" 14 case $1 in
15fi 15 --eps)
16 shift
17 EXT="eps"
18 TERMINAL="postscript color eps $NICE"
19 ;;
20 --lines)
21 shift
22 GRAPH=lines
23 ;;
24 --linespoints)
25 shift
26 GRAPH=linespoints
27 ;;
28 *)
29 break
30 ;;
31 esac
32done
16 33
17 34
18OUT=$1 35OUT=$1
@@ -29,11 +46,13 @@ while [ ! -z "$1" ] && [ ! -z "$2" ] && [ ! -z "$3" ] && [ ! -z "$4" ]; do
29 COL1=$2 46 COL1=$2
30 COL2=$3 47 COL2=$3
31 NAME=$4 48 NAME=$4
32 PLOT="$PLOT '${CSV}' using ${COL1}:${COL2} title '${NAME}' with points" 49 PLOT="$PLOT '${CSV}' using ${COL1}:${COL2} title '${NAME}' with $GRAPH"
33 shift 4 50 shift 4
34 if [ ! -z "$1" ]; then 51 if [ ! -z "$1" ]; then
35 PLOT="$PLOT, " 52 PLOT="$PLOT, "
36 fi 53 fi
54 # fixup csv file, gnuplot is picky
55 sed -i -e 's/,\([^ ]\)/, \1/g' "$CSV"
37done 56done
38 57
39#echo $OUT 58#echo $OUT
@@ -50,9 +69,6 @@ fi
50 69
51OUT="${OUT}.${EXT}" 70OUT="${OUT}.${EXT}"
52 71
53# fixup csv file, gnuplot is picky
54#sed -i -e 's/,\([^ ]\)/, \1/g' $CSV1
55
56gnuplot <<EOM 72gnuplot <<EOM
57set terminal $TERMINAL 73set terminal $TERMINAL
58set out '/dev/null' 74set out '/dev/null'
@@ -63,7 +79,7 @@ set ylabel '$YLABEL'
63set xlabel '$XLABEL' 79set xlabel '$XLABEL'
64set title '$TITLE' 80set title '$TITLE'
65set key below 81set key below
66set data style points 82set data style $GRAPH
67set out '$OUT' 83set out '$OUT'
68replot 84replot
69set out 85set out