XRANGE=4:25
LMARGIN=15 
SIZEX=1  
SIZEY=0.20 
OR1=0.68 
OR2=0.48 
OR3=0.28 
OR4=0.08

SHOTNO=3494



GPfPlasma=set datafile separator ';';set xrange [$(XRANGE)];set tmargin 0;set bmargin 1;set lmargin $(LMARGIN);set format y '%3.0f';set rmargin 3;set multiplot;set title 'Golem shot No:$(SHOTNO)';set size $(SIZEX),$(SIZEY);set origin 0,$(OR1);set ylabel 'U_{loop} [V]';unset key;unset xtics;set style data dots; set yrange [-1:30];plot 'Uloop_dp.csv' u 1:2 w l;\
unset title; set origin 0,$(OR2);set ylabel 'B_t [T]';set format y '%3.1f';unset key;set ytics ('0' 0,'0.2' 0.2, '0.4' 0.4, '0.6' 0.6, '0.8' 0.8);unset xtics;set yrange [-0.05:0.85];plot 'Btoroidal_dp.csv' w l;\
unset title; set origin 0,$(OR3);set ylabel 'I_p [kA]';set format y '%3.1f';unset key;set ytics ('0' 0,'1' 1, '2' 2, '3' 3, '4' 4, '5' 5);unset xtics;set yrange [-0.5:4.5];plot 'Iplasma_dp.csv' u 1:(\$$2/1000) w l;\
unset title; set origin 0,$(OR4);set ylabel 'PhotoD [a.u.]';set format y '%3.0f';unset key;set ytics ;set xtics ('5' 5,'10' 10, '15' 15, '20' 20, '25' 25, '30' 30);set xlabel 'Time [ms]';set yrange [-0.5:6];plot 'Photod_dp.csv' u 1:(\$$2*100) w l;\



all:
	killall gnuplot_x11; killall gnuplot;echo "$(GPfPlasma)"|gnuplot -persist

pres:
	echo "set terminal postscript enhanced;$(GPfPlasma)"|gnuplot > graph.ps;
	ps2pdf graph.ps 
#	echo "set terminal latex;$(GPfPlasma)"|gnuplot > graph.tex;\
#	convert -rotate 90 graph.ps graph.jpg























