gnuplot 数千个值
我想绘制数据库的内容。它包含成对的时间戳(例如1298136675887128524
)和节点当时的功耗(例如159.562042
)。每 10 毫秒测量一次功耗。它是一个 PSQL 数据库。我不太习惯 gnuplot 所以我在花很多时间尝试错误的方法之前先问一下...
我的想法是将我想要绘制的值导出到一个普通文件中,如下所示:
1298136675887128524 159.562042
1298136675888238531 160.124031
1298136675890241275 158.321967
然后我会缩放时间戳以便它以用户可读的方式表示在 x 轴上,并尝试绘制所有内容。因为我正在谈论超过 100000 行,所以我不太确定这是否是最好的方法..
感谢您的帮助!
i want to plot the contents of a database. It contains pairs of timestamp (e.g. 1298136675887128524
) and power consumption of a node at that time (e.g. 159.562042
). The power consumption is measured every 10th ms. It is a PSQL database. I am not really used to gnuplot so i ask before i spend a lot of time trying it the wrong way...
My idea would be to export the values i want to plot into a plain file like this:
1298136675887128524 159.562042
1298136675888238531 160.124031
1298136675890241275 158.321967
Then i would scale the timestamp so that it is represented on the x-axis in a user-readable way and try to plot everything. Since i am talking about >100000 of these lines i am not quite sure if this is the best way..
Thanks for the help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无需“缩放”您的 xaxis。只是:
或者类似的东西。
如果绘图过于密集,则在绘图时使用“every n”跳过 n-1 个点。
There is no need to "scale" your xaxis. Just:
or something similar.
Use "every n" to skip n-1 points while plotting, if your plot is too dense.