我试图在gnuplot中绘制一个对数周期函数:cos((log(abs(t-Tc))*PI/log10(lambda)+ phi)
但由于log(x)的性质接近x = 0,情节越来越难看.
如何在gnuplot中绘制对数周期函数,使其看起来不错?
我的剧情脚本如下所示:
phi = 1
TcFormated = 9.67e+8
lambda = 2
PI = 3.1415
g(t) = abs(cos((log(abs(t-TcFormated))*PI/log10(lambda) ) + phi))
set tmargin at screen 0.01
set bmargin at screen 0.99
set lmargin at screen 0.01
set rmargin at screen 0.99
set xrange [8.4e+8:1.04e+9]
set yrange [0:1]
unset xtics
unset ytics
plot g(x) t '' w l
pause -1
Run Code Online (Sandbox Code Playgroud)

设定后:
set samples 10000
Run Code Online (Sandbox Code Playgroud)
我有一个更好看的图表:

gnuplot ×1