Commit before breaking everything
[matches/honours.git] / research / simulations / egun / plot.sh~
1 #!/bin/bash
2
3 output=$2
4 if [ "$output" != "" ]; then
5         output="set term postscript colour; set output \"$output\""
6 fi
7
8 field=$1
9 if [ "$field" == "" ]; then
10         field="main.dat"
11 fi
12
13 plot="set contour base; set cntrparam level incremental -20,20,380; unset surface; set table \"cont.dat\"; splot \"$field\" u 1:2:3; unset table;"
14 plot="$plot $output; set xrange [0:500]; set yrange [0:377]; set zrange [-1:1]; set title \"TCS Electron Gun\"; unset key; set palette rgbformulae 33,13,10; plot \"$field\" w image, \"cont.dat\" w l lt -1 lw 1"
15  #plot \"../egun.png\" binary filetype=png flipy w rgbimage"
16
17 if false; then
18 count=1
19 for i in electron*.dat; do
20         if [ $count -eq 0 ]; then
21                 plot="$plot plot"
22                 count=1
23         else
24                 plot="$plot,"
25         fi
26         plot="$plot \"$i\" u 2:3 w l lt -1 lw 1"
27 done
28 fi
29 gnuplot --persist -e "$plot"

UCC git Repository :: git.ucc.asn.au