Ingo Thies wrote:
c1=1;c2=2
plot 'file' using c1:c2
But is it also possible to use variables for column numbers as a
function argument? "$c1" or similar don't work. For now, I can only do
this by replacing the column specifier in all the lines by
search&replace, but a global switch would be much more convenient.
This could be done using macros "help macro", but the clean way is
via the column() function (help column) [untested]:
c1=1;c2=2
plot 'file' using (column(c1)):(column(c2))
Juergen
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 286 |
Nodes: | 16 (3 / 13) |
Uptime: | 91:53:32 |
Calls: | 6,498 |
Calls today: | 9 |
Files: | 12,100 |
Messages: | 5,277,846 |