X-Git-Url: https://git.ucc.asn.au/?p=matches%2Fhonours.git;a=blobdiff_plain;f=research%2Fsimulations%2Fegun%2Fplot.sh;fp=research%2Fsimulations%2Fegun%2Fplot.sh;h=ad57d96ea322403696f7e2743d1f620f413fdad1;hp=0000000000000000000000000000000000000000;hb=70a96cca12cb006506461d26cd112bab179fe74c;hpb=8caf60af39689a3546074f0c68d14c3a2e28191e diff --git a/research/simulations/egun/plot.sh b/research/simulations/egun/plot.sh new file mode 100755 index 00000000..ad57d96e --- /dev/null +++ b/research/simulations/egun/plot.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +output=$2 +if [ "$output" != "" ]; then + output="set term postscript colour; set output \"$output\"" +fi + +field=$1 +if [ "$field" == "" ]; then + field="main.dat" +fi + +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;" +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" + #plot \"../egun.png\" binary filetype=png flipy w rgbimage" + +if false; then +count=1 +for i in electron*.dat; do + if [ $count -eq 0 ]; then + plot="$plot plot" + count=1 + else + plot="$plot," + fi + plot="$plot \"$i\" u 2:3 w l lt -1 lw 1" +done +fi +gnuplot --persist -e "$plot"