From be610af3ec405f0dbaa4eec3bf94905268b8b392 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Sun, 22 Feb 2009 00:41:36 -0500 Subject: remove old bash cruft --- plot_scatter | 125 ----------------------------------------------------------- 1 file changed, 125 deletions(-) delete mode 100755 plot_scatter (limited to 'plot_scatter') diff --git a/plot_scatter b/plot_scatter deleted file mode 100755 index de709f3..0000000 --- a/plot_scatter +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash - -#NICE="blacktext linewidth 4.0 \"Helvetica\" 16 " - -# try thinner lines -NICE="color blacktext solid linewidth 1.0 \"Helvetica\" 20 size 16cm,7cm" - -EXT="png" -TERMINAL="png size 1024,768 large" - -GRAPH=points -XTRA= -while true; do - case $1 in - --eps) - shift - EXT="eps" - TERMINAL="postscript eps $NICE" - ;; - --lines) - shift - GRAPH=lines - ;; - --xrange) - shift - XRANGE="set xrange [$1:$2]" - shift - shift - ;; - --xticks) - shift - XTICKS="set xtics $1, $2" - shift - shift - ;; - --yrange) - shift - YRANGE="set yrange [$1:$2]" - shift - shift - ;; - --yticks) - shift - YTICKS="set ytics $1, $2" - shift - shift - ;; - --extra) - shift - XTRA="$1" - ;; - --linespoints) - shift - GRAPH=linespoints - ;; - --*) - echo "unrecognized option: $1" - exit 1 - ;; - *) - break - ;; - esac -done - - -OUT=$1 -XLABEL=$2 -YLABEL=$3 -TITLE=$4 -shift 4 - -PLOT="plot " - - -while [ ! -z "$1" ] && [ ! -z "$2" ] && [ ! -z "$3" ] && [ ! -z "$4" ]; do - CSV=$1 - COL1=$2 - COL2=$3 - NAME=$4 - PLOT="$PLOT '${CSV}' using ${COL1}:${COL2} title '${NAME}' with $GRAPH" - shift 4 - if [ ! -z "$1" ]; then - PLOT="$PLOT, " - fi - # fixup csv file, gnuplot is picky - sed -i -e 's/,\([^ ]\)/, \1/g' "$CSV" -done - -#echo $OUT -#echo $XLABEL -#echo $YLABEL -#echo $TITLE -#echo $PLOT - -if [ "$PLOT" = "plot " ]; then - echo "Usage: $0 [--eps] "\ - "(<csv file> <column1> <column2> <label>)+" - exit 1 -fi - -OUT="${OUT}.${EXT}" -KEY="set key below" -KEY="set key off" -gnuplot <<EOM -set terminal $TERMINAL -set out '/dev/null' -$YRANGE -$YTICKS -$XRANGE -$XTICKS -$PLOT -set ylabel '$YLABEL' -set xlabel '$XLABEL' -set title '$TITLE' -$KEY -set data style $GRAPH -set out '$OUT' -replot -set out -EOM - -if [ "$EXT" == "eps" ]; then - ps2pdf -dEPSCrop $OUT -fi -- cgit v1.2.2