Mercurial > repos > erinija > dnp_binary_strings
comparison plot_selected.sh @ 0:611156829647 draft default tip
"planemo upload commit 1a32efb8343938e8d49190003f251c78b5a58225-dirty"
| author | erinija |
|---|---|
| date | Fri, 01 May 2020 12:07:46 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:611156829647 |
|---|---|
| 1 #!/bin/sh | |
| 2 | |
| 3 input=$1 | |
| 4 output=$2 | |
| 5 title=$3 | |
| 6 # columns should be separated by , : 1,2,4,5 | |
| 7 columns=$4 | |
| 8 | |
| 9 cut -f${columns} ${input} > input.tmp | |
| 10 | |
| 11 # calculate numberof columns | |
| 12 cnum=`head -n1 input.tmp | tr "\t" "\n" | wc | awk '{print $1}'` | |
| 13 | |
| 14 # plot the data with gnuplot in one line | |
| 15 gnuplot -e "set key outside; set terminal png; set output '${output}'; set title '${title}'; plot for [col=1:'${cnum}'] 'input.tmp' using 0:col with lines title columnheader;" | |
| 16 | |
| 17 rm input.tmp |
