Gnuplot x轴分辨率

cze*_*asz 29 gnuplot

我试图在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)

我有一个更好看的图表: log-periodic函数,设置样本10000

Wol*_*tan 30

如果你想增加分辨率试试

set samples <X>
Run Code Online (Sandbox Code Playgroud)

哪里<X>是整数.默认情况下,此整数设置为100.根据需要增加该数字.

但是,选择的整数越高,gnuplot绘制图形的时间就越长.