gnuplot-删除行标题

gnuplot-删除行标题,gnuplot,Gnuplot,我试着搜索,但找不到这种特殊情况的解决方案。在我的情节中,我比较了两条线索。我使用的是线图,两条迹线都用不同的颜色绘制 plot "delay_try1.dat" using 1:2 title 'With CloneScale' with lines, \ "normal_2.dat" using 1:2 title "Without CloneScale" with lines lc rgb "black", \ "normal2.dat" using 1:2 title

我试着搜索,但找不到这种特殊情况的解决方案。在我的情节中,我比较了两条线索。我使用的是线图,两条迹线都用不同的颜色绘制

plot "delay_try1.dat" using 1:2 title 'With CloneScale' with lines, \
     "normal_2.dat" using 1:2 title "Without CloneScale" with lines lc rgb "black", \
     "normal2.dat" using 1:2 title 'Without CloneScale' with lines lc rgb "black"

使用这个plot命令,我在图例中得到了3个标题,其中2个是重复的标题。我只想两个标题出现,并删除重复的一个。有可能做到这一点吗?

如果你不是在耍花招:

省略最后一个“无CloneScale”标题将从图例中删除标题和行。 将最后一个标题设置为空格将在图例中显示该行和(似乎)该行之前的任何内容:

plot "delay_try1.dat" using 1:2 title 'With CloneScale' with lines,"normal_2.dat" using 1:2 title "Without CloneScale" with lines lc rgb "black", "normal2.dat" using 1:2 title ' ' with lines lc rgb "black"

要做到这一点,您应该使用
notitle
标记

plot "delay_try1.dat" using 1:2 title 'With CloneScale' with lines, "normal_2.dat" using 1:2 title "Without CloneScale" with lines lc rgb "black", "normal2.dat" using 1:2 with lines lc rgb "black" notitle
或者更一般的例子

plot 'File.dat' using 1:2 notitle
notitle
等效的另一种方法是将
标题设置为零字符串

plot 'File.dat' using 1:2 title ""

如果您的无标题行比标题行多,则默认情况下使用
set key noautotitle
禁用标题会更方便:

set key noautotitle

plot "delay_try1.dat" using 1:2 title 'With CloneScale' with lines, \
     "normal_2.dat" using 1:2 title "Without CloneScale" with lines lc rgb "black", \
     "normal2.dat" using 1:2 with lines lc rgb "black"

您在plot命令中使用了3个标题(1个用于“带CloneScale”,2个用于“不带CloneScale”)。您只能使用1个用于“不带CloneScale”。但是图例将只显示两种类型的图形,而不是实际的三种类型。是的,我希望显示所有图形,但仅显示两个图例。省略最后一个标题将导致gnuplot生成默认标题,这是非常不可取的。而且,让行显示在图例中而不显示文本似乎也是不可取的。