Gnuplot x 轴分辨率

标签 gnuplot

我试图在 gnuplot 中绘制一个对数周期函数:cos((log(abs(t-Tc))*PI/log10(lambda) ) + phi)

但是由于接近 x=0 的 log(x) 的性质,情节变得丑陋。

如何在 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

log-periodic function

设置后:

set samples 10000

我得到了一个更好看的图表: log-periodic function with set samples 10000

最佳答案

如果你想提高分辨率试试

set samples <X>

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

不过,选择的整数越大,gnuplot 绘制图形所需的时间就越长。

关于Gnuplot x 轴分辨率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36900133/

相关文章:

gnuplot - 在 Gnuplot 的线图中显示特定值的标记

gnuplot:读取科学格式数字(非标准形式)的静默错误

gnuplot:热图,如 3d 表面的可见光谱

linux - 在 gnuplot 中保存 'stats' 命令的输出文件?

gnuplot - 使用 Gnuplot 绘制时间序列上的出现情况

styles - GNUPLOT 4.6 : custom contour lines

gnuplot - 如何在 gnuplot 中设置带有列标题的轴标签?

gnuplot - 如果 y 列的线条样式更改,则多图中的网格线也会更改

c - Gnuplot 和 C "x range is invalid"

math - gnuplot - 在椭球内绘制随机点