How do I convert an integer to a string in gnuplot?

gnuplot

Solution

Are you looking for something like:

plot for [c=1:5] datafile using (column(c)):(column(c+1))

This will do: `plot datafile u 1:2, "" u 2:3, "" u 3:4, "" u 4:5, "" u 5:6`

Problem

I know how to use `$` with `using` in examples like ``` plot datafile using f($1):g($2) ``` to plot functions of column data. But I want to use this feature in a loop: ``` plot for [c=1:10] datafile using f($(c)):g($(c+1)) ``` Of course this code doesn't work. I guess that if I know how to convert the integer `c` to a string (or a single ASCII character) then it would work. How can I do it? (If the same task can be done without conversion of integer to string, that would be fine too.)

Original source