#!/bin/bash

DPATH=/golem/GW/Experiments/EdgePlasmaPhysics/ParticleFlux/RakeProbe/1114ShotToShotMeasurement
BASE="set font 'Times Bold,12';set bmargin 0;set tmargin 0;set lmargin 10;set rmargin 3;unset xtics;unset xlabel;set multiplot layout 3, 1;set xrange [15:25];set yrange [0:0.5];set style data dots;set ylabel 'B_{t} [T]';unset xtics;plot '< wget -q -O - http://golem.fjfi.cvut.cz/utils/data/17743/toroidal_field' u ("'$1*1000'"):("'$2/1'") w l lw 2 lc 1 title '#17743: B_{t}=';set bmargin at screen 0.15;set xtics;set key right bottom;unset key;set xlabel 't [ms]';set ylabel 'I_{LP} #17739/#17762';set yrange [0:0.5];plot '< paste $DPATH/Sessions/1114Intro/Analysis/Data/17739v_r $DPATH/Sessions/1114Intro/Analysis/Data/17762v_r' u ("'$1*1000'"):("'abs($2/$4)'") w l lw 2 lc 1"



echo "$BASE"|gnuplot -persist;\
echo "set terminal postscript enhanced color portrait size 30,18 font 'Times Bold,50';$BASE"|gnuplot > graph.eps; convert graph.eps graph.jpg

	