#!/bin/bash
FLUKE="1000"

string="set terminal pdfcairo enhanced size 6,3 font ', 12';set out 'graf_1.pdf';"
string="$string set multiplot;set lmargin 8;"
string="$string set size 1,0.65;set xtics 3;set ylabel 'I_{sc} [A]';set xlabel 'time [s]'; plot 'kocman_300_cold_air/raw' u 1:((\$3-\$2*0.011)*$FLUKE) w l ti '300 turns, air';"
string="$string set format x '';set ylabel 'I_{pc} [A]';set yrange [-0.2:5];set size 1,0.4; unset xlabel;set origin 0,0.6;plot 'kocman_300_cold_air/raw' u 1:2 w l noti;"
# string="$string set ylabel 'secodnary windings voltage [A]';set title '$i'; set yrange [*:*];set size 1,0.3;set origin 0,0.6;plot 'raw' u 1:4 w l noti"
echo $string | gnuplot -persist
okular graf_1.pdf