如何在 Gnuplot 中缩放轴
我有一个数据集,其中有两个制表符分隔的列,我将它们绘制在简单的 XY 轴上。自变量(x 轴)是以分钟为单位的持续时间。我想要的是在几小时而不是几分钟内绘制此图。绘图时如何在 gnuplot 中应用这种缩放?
I have a data set that has two tab delimited columns that I plot in a simple XY axis. The independent variable (x axis) is duration in minutes. What I want is to plot this in hours instead of minutes. How would I apply this scaling in gnuplot while plotting?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这个问题;也许会有帮助。
在你的情况下,我希望你想要类似
这些命令告诉 gnuplot 你正在以分钟的形式提供时间数据,
但您希望它们显示小时和分钟。
编辑(参见注释):(忽略时间格式)缩放数据文件
data.dat
的轴可以按如下方式实现:$1
是您想要的列缩放,您可以通过数学运算对其进行操作。在移动到其他列之前,您通常需要将整个表达式括在括号中。
Have a look at this question; perhaps it will help.
In your case I expect you want something like
These commands tell gnuplot you are providing timedata in the form of minutes,
but you want them displayed with hours and minutes.
EDIT (see comments): (ignoring the time formatting) Scaling the axis of a data file
data.dat
can be achieved as follows:The
$1
is the column that you want to scale, which you manipulate with maths operations.You usually need to wrap the whole expression in parenthesis before the moving onto other columns.