Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3376 > unrolled thread
| Started by | ciro.santilli@gmail.com |
|---|---|
| First post | 2016-08-29 09:58 -0700 |
| Last post | 2016-08-30 23:43 -0700 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
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
| From | ciro.santilli@gmail.com |
|---|---|
| Date | 2016-08-29 09:58 -0700 |
| Subject | How to ignore a header line in the stats command? |
| Message-ID | <7e47b0a9-3463-49b0-ba0e-de7edaa811c8@googlegroups.com> |
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
I know about:
stats datafile name columnheader
but I don't want my `STAT_blocks` variable to change it's name unpredicatably.
[toc] | [next] | [standalone]
| From | Michael Okuntsov <okuntsov.mikhail@yandex.ru> |
|---|---|
| Date | 2016-08-30 01:18 +0700 |
| Message-ID | <nq1uae$pvi$1@dont-email.me> |
| In reply to | #3376 |
stats datafile every ::2
[toc] | [prev] | [next] | [standalone]
| From | Ethan A Merritt <EAMerritt@gmail.com> |
|---|---|
| Date | 2016-08-30 23:43 -0700 |
| Message-ID | <nq5ub0$u13$1@dont-email.me> |
| In reply to | #3376 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web