Wednesday, June 23, 2010

Gnuplot: skipping header line from input data file

The trick is in gnuplot command - "every"

The syntax of "every" is:
plot 'file' every {point_incr}
{:{block_incr}
{:{start_point}
{:{start_block}
{:{end_point}
{:end_block}}}}}

So, in order to skip the first two lines the gnuplot command would be:
plot "data.txt" using 1:5 every ::2 with linespoints linestyle 7
This will skip the first line of the data file