Gnuplot 将数据从文件绘制到某一行 [英] Gnuplot plotting data from a file up to some row

查看:28
本文介绍了Gnuplot 将数据从文件绘制到某一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一些文本文件中有数据,假设有 10000 行和 2 列.我知道我可以通过 plot "filename.txt" using 1:2 with lines 轻松绘制它.然而,我想要的只是绘制让我们说从 1000 到 2000 或任何其他合理选择的行.是否可以轻松做到这一点?非常感谢您提前.

I have data in some text file which has let's say 10000 rows and 2 columns. I know that I can plot it easily by plot "filename.txt" using 1:2 with lines . What I want is however just plotting let's say the rows from 1000 to 2000 or any other reasonable selection. Is it possible to do that easily? Thank you very much in advance.

推荐答案

更简单:

plot "<(sed -n '1000,2000p' filename.txt)" using 1:2 with lines

这篇关于Gnuplot 将数据从文件绘制到某一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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