columnheader - How do I set axis label with column header in gnuplot? -


my question simple. suppose have datafile column headers, follows

first second 1 1  2 1 3 6 4 9 

in gnuplot how make datafile plotted using column header axis label? e.g. calling

plot datafile using 1:2 

i xaxis labeled first , yaxis labeled second?

edit: know can use column header key entry via set key auto title column head, that's not quite i'm looking for.

to elaborate suggestion of @andyras, here how can it:

datafile = 'filename.txt' firstrow = system('head -1 '.datafile) set xlabel word(firstrow, 1) set ylabel word(firstrow, 2) plot datafile using 1:2 

you must plot explicit using statement, otherwise gnuplot complain bad data on line 1.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -