Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gnuplot - removing line title

Tags:

gnuplot

I tried searching, but I couldn't find the solution for this particular condition. In my plot , I am comparing two traces. I am using a line graph and both traces are plotted with different colors.

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"

Using this plot command, I get 3 titles in legends and 2 are repeating ones. I just want 2 titles to appear and remove the repeating one. Is it possible to do this?

like image 799
sethu Avatar asked Dec 23 '11 16:12

sethu


2 Answers

To accomplish this you should use the notitle tag.

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

or a more general example;

plot 'File.dat' using 1:2 notitle

an alternative that is equivalent to notitle is to set the title to a zero character string;

plot 'File.dat' using 1:2 title ""
like image 160
Mattias Avatar answered Sep 19 '22 17:09

Mattias


If you had more untitled lines than titled lines, it's more convenient to disable titles by default using 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"
like image 41
hertzsprung Avatar answered Sep 19 '22 17:09

hertzsprung