list = "6 8 9"
plot for [i in list] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)
Am 13.07.2021 um 14:11 schrieb Jörg Buchholz:
list = "6 8 9"
plot for [i in list] 'file' skip 6 u 2:i w l t sprintf("T_%i",i-2)
Close, but no cigar. The string-based list does not work like that
because its elements evaluated by the for loop are still strings.
The following would have worked, though:
plot for [i in "6 8 9"] 'file' u 2:int(i)
The following may be more useful. See "help arrays" to understand what
it does:
n = 3
array list[n] = [6, 8, 9]
plot for [i in 1:n] 'file' u 2:list[i]
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 285 |
Nodes: | 16 (2 / 14) |
Uptime: | 68:18:30 |
Calls: | 6,488 |
Calls today: | 1 |
Files: | 12,096 |
Messages: | 5,275,281 |