Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3378

Re: How to ignore a header line in the stats command?

From Ethan A Merritt <EAMerritt@gmail.com>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: How to ignore a header line in the stats command?
Date 2016-08-30 23:43 -0700
Organization A noiseless patient Spider
Message-ID <nq5ub0$u13$1@dont-email.me> (permalink)
References <7e47b0a9-3463-49b0-ba0e-de7edaa811c8@googlegroups.com>

Show all headers | View raw


ciro.santilli@gmail.com wrote:

> Goal: automate
> http://stackoverflow.com/questions/12818797/gnuplot-plotting-several-datasets-with-titles-from-one-file/39211206#39211206
> :
> 
> Data:
> 
> ```
> a
> 1, 1
> 2, 2
> 3, 3
> 
> 
> b
> 1, 1
> 2, 4
> 3, 9
> ```
> 
> Current script:
> 
> ```
> datafile = 'test.dat'
> stats datafile nooutput
> plot for [IDX=0:STATS_blocks-1] \
>     datafile \
>     index IDX \
>     using 1:2 \
>     with lines \
>     title columnheader(1)
> ```
> 
> gives a warning:
> 
>    "tmp.gnuplot", line 4: warning: bad data on line 1 of file tmp.data
> 
> I wish I could write something like:
> 
>     stats datafile nooutput columnheader(1)
> 
> which would ignore that header


   stats datafile skip 1 using whatever






> 
> I know about:
> 
>     stats datafile name columnheader
> 
> but I don't want my `STAT_blocks` variable to change it's name
> unpredicatably.

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar


Thread

How to ignore a header line in the stats command? ciro.santilli@gmail.com - 2016-08-29 09:58 -0700
  Re: How to ignore a header line in the stats command? Michael Okuntsov <okuntsov.mikhail@yandex.ru> - 2016-08-30 01:18 +0700
  Re: How to ignore a header line in the stats command? Ethan A Merritt <EAMerritt@gmail.com> - 2016-08-30 23:43 -0700

csiph-web