user4914499
user4914499

Reputation: 354

For loop with showing key one time in gnuplot

Does anybody know how to show key only one time not for every time in for-loop in gnuplot?

e.g.

filename(n) = sprintf("band%d", n)
plot for [i=0:9] filename(i) using (\$1):(\$2-$vbm1) w l lt 1 lw 3 lc rgb "sienna1"

In this case, 100 keys written in filename(i) using (\$1):(\$2-$vbm1) are generated for every runs in for-loop.

Upvotes: 1

Views: 183

Answers (1)

ewcz
ewcz

Reputation: 13087

you could use a conditional explicit title, for example:

plot for [i=0:9] filename(i) ... w l t (i==0?'some title':'')

this would show the key only for filename(0)

Upvotes: 3

Related Questions