gnuplot:如何读取datafile.txt和set的第一行作为标题

发布于 2025-02-01 17:28:38 字数 224 浏览 2 评论 0原文

有一个txt文件:

Nameofgraph
x y
0 1
3 4
5 7

需要用标题为“ nameofgraph”的y(x)

可能

(read first line as string)
set title title_name
nskip=1 
plot filename skip nskip x:y

have a txt file:

Nameofgraph
x y
0 1
3 4
5 7

need to plot y(x) with title "Nameofgraph"

maybe something of

(read first line as string)
set title title_name
nskip=1 
plot filename skip nskip x:y

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

桃扇骨 2025-02-08 17:28:38

找到了一种方法:

set title "`head -1 filename.txt`"

found a way:

set title "`head -1 filename.txt`"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文