【发布时间】:2011-11-19 05:30:19
【问题描述】:
我正在尝试在 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
设置后:
set samples 10000
我得到了一个更好看的图表:
【问题讨论】:
-
我不敢相信 100 是默认值。即使 abs(x) 也很丑陋。我打开了“将 'set samples 1000' 作为默认值”功能请求,让我们看看会发生什么 - sourceforge.net/p/gnuplot/feature-requests/376
-
不同功能的不同费率:stackoverflow.com/questions/19524582/…
-
不敢相信这么快就被拒绝了! @Bulwersator
标签: gnuplot