gnuplot set key issue

Hi

I have a plotting function like this-

plot    '../processing_old/time0.txt' using 1:6 title "1.6" with boxes  fs solid 0.05 ls 5,\
        'time0.txt' using 1:6 title "1.7" with boxes fs solid 0.05 ls 6,\
        '../processing_new/time0.txt' using 1:6 title "2.0" with boxes  fs solid 0.05 ls 7,\
        '../processing_old/time1.txt' using 1:6 with boxes  fs solid 0.05 ls 5,\
        'time1.txt' using 1:6 with boxes fs solid 0.05 ls 6,\
       '../processing_new/time1.txt' using 1:6 with boxes  fs solid 0.05 ls 7,\
        '../processing_old/time2.txt' using 1:6 with boxes  fs solid 0.05 ls 5,\
        'time2.txt' using 1:6 with boxes fs solid 0.05 ls 6,\
       '../processing_new/time2.txt' using 1:6 with boxes  fs solid 0.05 ls 7,\
        '../processing_old/time3.txt' using 1:6 with boxes  fs solid 0.05 ls 5,\
        'time3.txt' using 1:6 with boxes fs solid 0.05 ls 6,\
       '../processing_new/time3.txt' using 1:6 with boxes  fs solid 0.05 ls 7

In this I have 4 groups of three values that I am plotting, As you can see I have used the same ls value for the same values. When plotting the key, I either get 12 values in the key, or I can only turn it off completely. Is it possible to set the key to show just three values? ie, 1.6 1.7 and 2?

Thanks.

Hi

I have a plotting function like this-

plot    '../processing_old/time0.txt' using 1:6 title "1.6" with boxes  fs solid 0.05 ls 5,\
        'time0.txt' using 1:6 title "1.7" with boxes fs solid 0.05 ls 6,\
        '../processing_new/time0.txt' using 1:6 title "2.0" with boxes  fs solid 0.05 ls 7,\
        '../processing_old/time1.txt' using 1:6 with boxes  fs solid 0.05 ls 5,\
        'time1.txt' using 1:6 with boxes fs solid 0.05 ls 6,\
       '../processing_new/time1.txt' using 1:6 with boxes  fs solid 0.05 ls 7,\
        '../processing_old/time2.txt' using 1:6 with boxes  fs solid 0.05 ls 5,\
        'time2.txt' using 1:6 with boxes fs solid 0.05 ls 6,\
       '../processing_new/time2.txt' using 1:6 with boxes  fs solid 0.05 ls 7,\
        '../processing_old/time3.txt' using 1:6 with boxes  fs solid 0.05 ls 5,\
        'time3.txt' using 1:6 with boxes fs solid 0.05 ls 6,\
       '../processing_new/time3.txt' using 1:6 with boxes  fs solid 0.05 ls 7

In this I have 4 groups of three values that I am plotting, As you can see I have used the same ls value for the same values. When plotting the key, I either get 12 values in the key, or I can only turn it off completely. Is it possible to set the key to show just three values? ie, 1.6 1.7 and 2?

Thanks.

Sure! Just append "notitle" to the plot commands that you want to omit from the key.

Lee Phillips
gnuplot Cookbook
available on Amazon

Hi,
Thanks, but that would totally omit all of the key. I want it to have just 3 values out of 12.
Is that possible?

No, the "notitle" keyword, used in individual plot commands, omits just those curves from the key, leaving the other intact. Like this:

gnuplot> plot sin(x), sin(2*x) notitle, cos(x)

Try it!

1 Like

woo, why didnt I think of that? :smiley: Will try it out. Thanks a lot LeePhillips :slight_smile:

Really appreciate it.

Hi
Did u mean to use something like this?

'../processing_old/time1_a.txt' using 1:6 notitle with boxes  fs pattern 1 ls 5 lw 4,\

It returns me a duplicated or contradicting arguments in plot options error.

Thanks.

Which version of gnuplot are you running? On 4.4.3 I get no error with your command. But I think that your "fs" and "with boxes" might be the contradiction. Why not try removing one of these clauses?

Hi
Im on 4.4.4 and something like this is the solution

 '../../opp_New folder/processing_3buff/time1_a.txt' using 1:6  notitle "TITle" with boxes fs solid 0.05 ls 6 lw 4,\

THanks a lot LeePhillips!