gpt4 book ai didi

graph - gnuplot 图例与图重叠

转载 作者:行者123 更新时间:2023-12-03 01:10:41 24 4
gpt4 key购买 nike

本质上,我遇到的问题是图例与我尝试绘制的 gnuplot 图重叠,如下图所示。

Timings

以下是我用来绘制数据的命令。

> set log y
> plot "datafile1.txt" using 2:4 with lines,
"datafile1.txt" using 2:6 with lines,
"datafile2.txt" using 2:4 with lines,
"datafile2.txt" using 2:6 with lines

以下是我用来绘制数据的数据文件 1 的一部分。

Dimension:  259 Timing: 36111 seconds,  9 seconds
Dimension: 260 Timing: 37860 seconds, 9 seconds
Dimension: 261 Timing: 39477 seconds, 6 seconds
Dimension: 262 Timing: 41215 seconds, 5 seconds
Dimension: 263 Timing: 41827 seconds, 5 seconds
Dimension: 264 Timing: 42738 seconds, 11 seconds
Dimension: 265 Timing: 42972 seconds, 14 seconds
Dimension: 266 Timing: 44138 seconds, 10 seconds
Dimension: 267 Timing: 45210 seconds, 11 seconds
Dimension: 268 Timing: 46508 seconds, 9 seconds
Dimension: 269 Timing: 51120 seconds, 15 seconds
Dimension: 270 Timing: 49352 seconds, 6 seconds
Dimension: 271 Timing: 50456 seconds, 9 seconds
Dimension: 272 Timing: 52379 seconds, 16 seconds
Dimension: 273 Timing: 52354 seconds, 16 seconds

以下是我用来绘制数据的数据文件 2 的一部分。

Dimension:  269 Timing: 32507 seconds,  2 seconds
Dimension: 270 Timing: 33064 seconds, 4 seconds
Dimension: 271 Timing: 33590 seconds, 6 seconds
Dimension: 272 Timing: 33703 seconds, 3 seconds
Dimension: 273 Timing: 34616 seconds, 3 seconds
Dimension: 274 Timing: 36113 seconds, 4 seconds
Dimension: 275 Timing: 36477 seconds, 4 seconds
Dimension: 276 Timing: 37000 seconds, 2 seconds
Dimension: 277 Timing: 37872 seconds, 3 seconds
Dimension: 278 Timing: 42290 seconds, 6 seconds
Dimension: 279 Timing: 39862 seconds, 7 seconds
Dimension: 280 Timing: 40184 seconds, 7 seconds
Dimension: 281 Timing: 41229 seconds, 4 seconds
Dimension: 282 Timing: 43221 seconds, 3 seconds
Dimension: 283 Timing: 42706 seconds, 7 seconds

任何有关如何克服此问题的帮助或建议将不胜感激。

最佳答案

如果您想完全关闭它:

gnuplot> set nokey

如果你想移动图例,你可以这样做

gnuplot> set key left top

将其移至左上角。如果您想在图例中为线条指定更有意义的名称,请在生成绘图时使用 title 关键字:

gnuplot> plot "datafile1.txt" using 2:4 with lines title "data",
....

关于graph - gnuplot 图例与图重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12208054/

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