Handling/CompAlgSystems4GolemUpToShotNo31150/gnuplot/howtos

Simplest usage wget+gnuplot

Multiple graphs in one figure


Full jpg, svg version (recommended), canvas version (recommended), script.

Online \(T_e\) calculation

echo "x=0;set xrange [0.007:0.02];plot '< wget -q -O - http://golem.fjfi.cvut.cz/utils/data/14306/nistandard' u 1:((((x=x+\$4*5)-\$2/0.01*5.5)*0.7/(\$2*5.5))**(2/3.0)) w l title 'RP'"|gnuplot -persist

3D graphs

(fast variant) ShotPath=http://golem.fjfi.cvut.cz/utils/data/14754;wget -q -O - $ShotPath/papouch_za >papouch_za;echo "set yrange [`wget -q -O - $ShotPath/plasma_start`:`wget -q -O - $ShotPath/plasma_end`]; splot 'papouch_za' u (1):1:2 w l t '#1',`for i in \`seq 2 12\` ;do echo -ne \'\' u \($i\):1:$i w l t \'\#$i\',; done` '' u (12):1:12 w l t '#12'"|gnuplot -persist

(slow, elegant variant) ShotPath=http://golem.fjfi.cvut.cz/utils/data/14754;echo "set yrange [`wget -q -O - $ShotPath/plasma_start`:`wget -q -O - $ShotPath/plasma_end`]; splot '< wget -q -O - $ShotPath/papouch_za' u (1):1:2 w l t '#1',`for i in \`seq 2 12\` ;do echo -ne \'\' u \($i\):1:$i w l t \'\#$i\',; done` '' u (12):1:12 w l t '#12'"|gnuplot -persist

colormap and plot from matrix

shotnum=14838; Time_start=`wget -q -O - http://golem.fjfi.cvut.cz/utils/data/$shotnum/plasma_start`; Time_end=`wget -q -O - http://golem.fjfi.cvut.cz/utils/data/$shotnum/plasma_end`;  echo `echo |(echo 26; seq 1 1 25)` > kanaly_rada.txt; echo| (echo| cat kanaly_rada.txt; paste <(wget -q -O - http://golem.fjfi.cvut.cz/utils/data/$shotnum/papouch_za | sed 1d) <(wget -q -O - http://golem.fjfi.cvut.cz/utils/data/$shotnum/papouch_ko | sed 1d)) > dat_test.txt; echo "set pm3d implicit at bst map ; unset surface; set pm3d interpolate 20,20; set term png; set output \"|display\"; set key horizontal font \"Helvetica, 20\" width 1.8 at graph 0.84; set title 'bolometric heat map for shot number $shotnum'; set ytics 1,1,24; set xlabel 'channel number'; set ylabel 'U[V]'; set xlabel 't[ms]'; set yrange [24:1]; set palette rgbformulae 21,22,23; set xrange [$Time_start*1e3:$Time_end*1e3]; splot  'dat_test.txt' every :100 nonuniform matrix using (\$2*1e3):1:(-\$3) title ' '"|gnuplot

#Hints

  • echo -e “1 12 2”|gnuplot -p -e “plot ‘-’”

#For Linux fan club (GOLEM specific):

If you have wget and gnuplot installed, then you can try something like this right from the command line:

Two charts in one plot (compare \(U_l\) signals from 2 discharges)

echo "set ytics nomirror;set xrange [0:0.04];set yrange [0:20];set style data dots;set ylabel 'loop_voltage';set y2label 'loop_voltage';plot '< wget -q -O - http://golem.fjfi.cvut.cz/cgi-bin/data/13849/loop_voltage' u 1:2 w l title '13849-loop_voltage','< wget -q -O - http://golem.fjfi.cvut.cz/cgi-bin/data/13850/loop_voltage' u 1:2 w l title '13850-loop_voltage'"|gnuplot -persist

realtime integration of \(I_{rog}\) coil signal

.~~~ echo "dt=0.001;x=0.00;set xrange [0.005:0.02];set yrange [0:0.8];set style data dots;set ylabel ‘loop_voltage’;set y2label ‘loop_voltage’;plot ‘< wget -q -O - http://golem.fjfi.cvut.cz/cgi-bin/data/14257/irog’ u 1:2 w l title ‘irog’,‘< wget -q -O - http://golem.fjfi.cvut.cz/cgi-bin/data/14257/irog’ u 1:(x=x+$2*dt) w l title ‘irog’;print x"|gnuplot -persist ~~~


If you have anything to contribute to this page, you are welcome to send it to mail with a small description where and what you are offering. Thank you in advance, GOLEM team.