Plotting columns by calling their header with GnuPlot

Viewed 7257

I have file of this format:

x y1 y2 y3 ei1 ei2 ei3 es1 es2 es3
1 4 5 4 7 7 2 4 7 7
2 7 3 3 3 8 3 3 3 8
3 2 1 4 4 9 6 4 4 9

I want to produce plots similar to what the following command would give

plot "filename" using 1:2:5:8  with yerrorbars

but using the columns headers(x, y1, ei1 and es1) to call them. How can this be done?

Page 84 of the gnuplot manual (documenting the using command) reads:

Height Weight Age
val1   val1   val1
...    ...    ...

then the following plot commands are all equivalent

plot ’datafile’ using 3:1, ’’ using 3:2

plot ’datafile’ using (column("Age")):(column(1)), \
’’ using (column("Age")):(column(2))

plot ’datafile’ using "Age":"Height", ’’ using "Age":"Weight"

However when I tried them I only got the row indices versus themselves.

1 Answers
Related