#result.txt only
resetif(exist("n")==0) n=0
set size square
#set size 0.5
set terminal png
set output sprintf("./fig/%d.png",n)
coef=0.1#coefを使ってミスを防ごう
set multiplot layout 2,2#i n に注意
p "result2.txt" i n u 1:2:(coef*$3):(coef*$4) w vec t "u" lw 2\
,"" i n u 1:2:(coef*$5) w yerrorbars lw 1 t "p"
p "result2.txt" i n u 1:2:(coef*$6):(coef*$7) w vec lw 2 t "s_1"\
,"" i n u 1:2:(coef*$8):(coef*$9) w vec lw 1 t "s_2"
t=n*0.125
u1(x,y)=y
u2(x,y)=x
p(x,y)=x-1./2
s11(x,y)=x
s12(x,y)=x
s21(x,y)=x
s22(x,y)=x
p "result2.txt" i n u 1:2:(coef*u1($1,$2)):(coef*u2($1,$2)) w vec t "u" lw 2\
,"" i n u 1:2:(coef*p($1,$2)) w yerrorbars lw 1 t "p"
p "result2.txt" i n u 1:2:(coef*s11($1,$2)):(coef*s21($1,$2)) w vec lw 2 t "s_1"\
,"" i n u 1:2:(coef*s12($1,$2)):(coef*s22($1,$2)) w vec lw 1 t "s_2"unset multiplot
n=n+1
pause 1if(n<80) reread