リグエキスパートのAA-30.ZEROグラフ描画(2)

この方が、読みやすいでしょうか。

# Gnuplot script for AA-30.ZERO

reset
set terminal aqua enhanced title 'AA-30.ZERO' size 1200 900
set multiplot layout 2,2 title 'My Antenna'
set grid
unset key

fname = 'mydata.txt'
set datafile separator ','

z0         = 50.0
z(r,x)     = r + x*{0,1}
rho(z)     = (z-z0)/(z+z0)
retloss(z) = -20.0 * log( abs(rho(z)) ) / log( 10.0 )
vswr(z)    = ( 1+abs(rho(z)) ) / ( 1-abs(rho(z)) )

set title 'Impedance (R, X, and Z)'
plot   fname using 1:( abs(z($2,$3)) ) with line linewidth 3, \
       ''    using 1:2                 with line linewidth 3, \
       ''    using 1:3                 with line linewidth 3, \
       0.0                             with line linewidth 3 lc "#80000000"

set title 'Return Loss'
plot '' using 1:( retloss(z($2,$3)) ) with line linewidth 3 linetype 4

set title 'VSWR'
plot '' using 1:( vswr   (z($2,$3)) ) with line linewidth 3 linetype 7, \
     1.0                              with line linewidth 3 lc "#80000000"

set title 'Smith Chart'
set polar
set grid polar
set size square
set xrange [-1:+1]
plot '' using ( arg(rho(z($2,$3))) ) : ( abs(rho(z($2,$3))) ) : (3*$1) with line linewidth 3 linetype 6

unset multiplot
reset