Gnuplot X轴分辨率 [英] Gnuplot x-axis resolution

查看:104
本文介绍了Gnuplot X轴分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

但是由于log(x)接近x = 0的性质,该图变得丑陋.

I'm trying to plot in gnuplot a log-periodic function: cos((log(abs(t-Tc))*PI/log10(lambda) ) + phi)

But because of the nature of log(x) near to x=0, the plot is getting ugly.

如何在gnuplot中绘制对数周期函数,使其看起来不错?

How to plot a log-periodic function in gnuplot so it looks nice?

我的剧情脚本如下:

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

我有一个更好看的图:

I got a much better looking graph:

推荐答案

如果要提高分辨率,请尝试

If you want to increase the resolution try

set samples <X>

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

where <X> is an integer. Per default this integer is set to 100. Increase that number to your needs.

尽管,选择的整数越高,gnuplot绘制图形所花费的时间就越长.

Though, the higher the integer is chosen the longer it will take gnuplot to plot the graph.

这篇关于Gnuplot X轴分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆