---
format:markdown
...
# Simplest usage wget+gnuplot
~~~ { .bash }
echo "set ytics nomirror;plot '< wget -q -O - http://golem.fjfi.cvut.cz/shots/0/DAS/1011NIbasic.ON/NIdata_5114_ch0_ascii.txt' u 1:2 w l title 'data'" | gnuplot -persist
~~~
# Multiple graphs in one figure
[Full jpg](figures/WGpressureScan/graph.jpg),
[svg version](http://golem.fjfi.cvut.cz/wikiraw/SW/gnuplot/figures/WGpressureScan/graph.svg) (recommended),
[canvas version](http://golem.fjfi.cvut.cz/wikiraw/SW/gnuplot/figures/WGpressureScan/graph.html) (recommended),
[script](figures/WGpressureScan/script.sh).
~~~ { .bash }
BASE="\
set xrange [9:25];set yrange [0:12];set style data dots;set ylabel 'U_{loop} [V]';set xlabel 't [ms]';set key right outside;\
plot `for i in 485 484 483 482 480 478 476 475 474 $(seq 487 494); do echo -n "'< \
wget -q -O - http://golem.fjfi.cvut.cz/cgi-bin/data/11$i/loop_voltage' \
u ("'$1*1000'"):2 w l title '#11$i $(wget -qO- http://golem.fjfi.cvut.cz/cgi-bin/data/11$i/pressure) mPa',"; done` 0\
"
echo $BASE|gnuplot -persist;
echo "set terminal jpeg size 800,600;$BASE"|gnuplot > graph.jpg;
echo "set terminal svg enhanced mouse jsdir 'http://golem.fjfi.cvut.cz/wikiraw/SW/gnuplot/js/';$BASE"|gnuplot > graph.svg
echo "set term canvas enhanced mousing jsdir 'http://golem.fjfi.cvut.cz/wikiraw/SW/gnuplot/js/';$BASE"|gnuplot > graph.html
~~~
# 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
