【问题标题】:Gnuplot x-axis resolutionGnuplot x 轴分辨率
【发布时间】: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

我得到了一个更好看的图表:

【问题讨论】:

标签: gnuplot


【解决方案1】:

如果你想提高分辨率试试

set samples <X>

其中&lt;X&gt; 是一个整数。默认情况下,此整数设置为 100。根据需要增加该数字。

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-16
    • 1970-01-01
    • 2011-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多