gnuplot で 3 つの関数をプロットしたいのですが、そのうちの 1 つがより高いサンプリング レートを持っています。その理由は、その高いサンプリング レートでは、破線が多少圧縮されて見え、互いに区別しにくくなるためです。サンプリング レートの高い関数は実線でプロットし、他の 2 つの関数は破線でプロットする必要があります。これが実際の例です:
set term postscript dashed
set out 'test1.ps'
iu = {0.,1.}
kmax = 1.e1
lami = 1.e-2
lamf = 1.e2
lmax = lamf
tau = 5.
fun(x) = (exp(-2. * iu * x * pi * kmax) * (-1. + exp(2. * iu * x * pi * (1. + kmax)))**2 * (atan(lamf / (2. * x * pi)) - atan(lami / (2. * x * pi)))) / (2. * (-1. + exp(2. * iu * x * pi))**2 * x * pi * kmax**0 * (lamf - lami))
funSimp(x) = (2. * tau)/(4. * x**2 * pi**2 + tau**2)
funSimpler(x) = atan(lmax / (2. * x * pi)) / (2. * x * pi)
set xr [1e-4:500]
set yr [1e-6:10]
set logscale x
set logscale y
set samples 10000
plot \
fun(x) / 20. t 'f' w l, \
funSimp(x) t 'fs' w l, \
funSimpler(x) / 20. t 'fss' w l
「fs」と「fss」の破線は、凡例に表示されているものとは異なって見えます。やってみました
set samples 10000
plot \
fun(x) / 20. t 'f' w l
set samples 50
plot \
funSimp(x) t 'fs' w l ls 2, \
funSimpler(x) / 20. t 'fss' w l ls 3
しかし、最初のプロットのみがファイルに出力されるため、これはうまくいきません。replot
も役に立ちませんでした。
gnuplot 4.6.5、勝利 7 64