tgranular2img - granular - granular dynamics simulation
(HTM) git clone git://src.adamsgaard.dk/granular
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
tgranular2img (709B)
---
1 #!/bin/sh
2
3 usage() {
4 printf 'usage: %s [-f field] [-h] [-l label] [-t term]\n' "${0##*/}" 1>&2
5 }
6
7 field='$1'
8 label="diameter [m]"
9 term="pdf"
10 row="1"
11 while getopts 'f:hl:t:' arg; do
12 case "${arg}" in
13 f) field="${OPTARG}" ;;
14 h) usage; exit 0 ;;
15 l) label="${OPTARG}" ;;
16 t) term="${OPTARG}" ;;
17 *) usage; exit 1 ;;
18 esac
19 done
20 shift $((OPTIND - 1))
21 if test $# != 0; then
22 usage
23 exit 1
24 fi
25
26 awk -F' ' "{print \$2, \$3, \$1 / 2.0, ${field}}" \
27 | gnuplot -e "set term ${term};\
28 set xlabel 'x [m]';\
29 set ylabel 'y [m]';\
30 set cblabel '${label}';\
31 set size ratio -1;\
32 plot '-' with circles fill solid fillcolor palette lw 0 title ''"