Lets say I have a data file with three columns. I want to be able to change the x-axis labels. After a little googling I found xticlabels() but the problem is that it only seems to take a column number as the argument. For ex- plotting with xticlabels(3) marks the labels with the third column.
I want to be able to put something like $1+$2 as the argument for this function i.e. the label should be a concatenation of column1 and column2.
How do I do this ?
You use awk…
Of course, this is a silly example because we’re concatenating 2 (numeric) fields to create the labels — It’s doubtful that is what you want, but it shows how to concatenate two fields (as strings) in awk and that’s really all you need.
Alternatively, you can probably coax gnuplot to do this (untested) with some variant of the following: