如何在大y轴整数处绘制水平线? [英] How to draw a horizontal line at the large y-axis integer?

查看:207
本文介绍了如何在大y轴整数处绘制水平线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于以下data.dat文件:

08:01:59 451206975237005878
08:04:07 451207335040839108
08:05:56 451207643872368805
08:07:49 451207961547842270
08:09:56 451208317883903787
08:10:12 451208364811411904
08:14:09 451209030026853864
08:16:19 451209395116787156
08:17:14 451209552481002386
08:20:22 451210080432357203
08:25:36 451210963309583903
08:30:23 451211772783766177
08:34:04 451212394854723707
08:35:53 451212702239472024
08:48:46 451214876715294857
08:49:56 451215072475511660
08:51:24 451215321890488523
08:52:39 451215533925588479
08:52:42 451215542324801784
08:54:30 451215845971562410
08:55:08 451215951262906948
08:58:30 451216519498960432

我想在特定级别绘制一条水平线(例如451211772783766177).但是,该数字太大,无法处理.

I'd like to draw a horizontal line at the specific level (e.g. 451211772783766177). However, the number is too large to process.

这是我的尝试(基于此帖子):

Here is my attempt (based on this post):

$ gnuplot -p -e 'set arrow from 451211772783766177 to 451211772783766177; plot "data.dat" using 2 with lines'

会出现以下错误:

第0行:警告:整数溢出;变为浮点数

line 0: warning: integer overflow; changing to floating point

我应该如何进行?

推荐答案

我会将您的大量数字视为常量函数,然后将其绘制在数据之后.另外,以指数符号X.XE+YY = X.X times 10 to the +YY power编写(有关格式说明符的更多信息,请参见此处)还会处理错误:

I would treat your large number as a constant function, and plot it right after your data. Also, writing it on a exponential notation X.XE+YY = X.X times 10 to the +YY power (more info on format specifiers here) also takes care of the error:

plot "data.dat" using 2 with lines, 4.51211772783766177E17 with lines

让我知道这是否有效!

这篇关于如何在大y轴整数处绘制水平线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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