Jörg Buchholz
2021-07-13 12:11:01 UTC
Hello,
I have a dataset with 10 columns. First I will plot most of them and I use:
plot for [i = 3:10] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)
in a second plot I will plot only column 6,8 and 9. Is there a way to
use a list of numeric or only a list of strings.
Plot for [i = 6, 8, 9] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)
or
list = "6 8 9"
plot for [i in list] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)
Does not work. A solution that works is the following, but it is little
more work.
plot for [i = 6:8:2] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2),\
for [i = 9:9] '' skip 6 u 2:i w l t sprintf("T_%i",i-2)
Jörg
I have a dataset with 10 columns. First I will plot most of them and I use:
plot for [i = 3:10] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)
in a second plot I will plot only column 6,8 and 9. Is there a way to
use a list of numeric or only a list of strings.
Plot for [i = 6, 8, 9] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)
or
list = "6 8 9"
plot for [i in list] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)
Does not work. A solution that works is the following, but it is little
more work.
plot for [i = 6:8:2] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2),\
for [i = 9:9] '' skip 6 u 2:i w l t sprintf("T_%i",i-2)
Jörg