gpt4 book ai didi

gnuplot - 在 Gnuplot 上绘图 - 跳线

转载 作者:行者123 更新时间:2023-12-02 13:39:44 26 4
gpt4 key购买 nike

我在 Gnuplot 中读取文件时遇到一些问题。例如,我有一个这样的文件:

___________________________________________
'#current'
month followed retweeted mentioned replied

Jan 395 29 35 28

Feb 380 28 32 31

'#previous'
month followed retweeted mentioned replied

Jan 381 30 38 32

Feb 378 25 42 30

Mar 374 28 46 40
______________________________________________________

我只需要读取以标签“#previous”开头的第二个 block 。我该怎么做?我尝试了这个命令:

plot "data.txt" index 'previous' using 3:xticlabel(1) axes x1y1 with lines linecolor rgbcolor "red",\

但它不起作用。有什么想法吗?

最佳答案

查看此问题的答案

Gnuplot: Plotting several datasets with titles from one file

我认为你需要像这样在索引后添加 1

使用 3:xticlabel(1) 轴 x1y1 和线条 linecolor rgbcolor“red”绘制“data.txt”索引1

编辑:数据集的索引为 0,因此第一个 block 的索引为 0,第二个 block (前一个)的索引为 1。您提到的有关坏行的错误表明我们的数据文件格式存在问题。在这些链接中了解数据格式 http://www.gnuplotting.org/plotting-data/ http://lowrank.net/gnuplot/datafile2-e.html

关于gnuplot - 在 Gnuplot 上绘图 - 跳线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16348594/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com