我试过搜索,但我找不到这种特殊情况的解决方案。在我的情节中,我正在比较两条痕迹。我使用折线图,两条迹线都用不同的颜色绘制。
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"
根据我使用的当前命令,我在传说中获得3个标题,在重复中获得2个。我只想要出现2个标题并删除重复的标题。有可能这样做吗?
答案 0 :(得分:35)
要完成此操作,您应使用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
的替代方法是将title
设置为零字符串;
plot 'File.dat' using 1:2 title ""
答案 1 :(得分:3)
如果您的无标题行多于标题行,则默认情况下使用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"
答案 2 :(得分:0)
如果你没有超过一点诡计:
省略最后一个“没有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"