Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3661
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Ethan A Merritt <sfeam@users.sourceforge.net> |
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: skipping values in a data file |
| Date | Fri, 02 Jun 2017 13:25:26 -0700 |
| Organization | gnuplot development |
| Lines | 57 |
| Message-ID | <ogshd7$lbn$1@dont-email.me> (permalink) |
| References | <1137a62e-23b6-4d9e-8b9f-62e034b6f9db@googlegroups.com> <ogq0k3$ge$1@dont-email.me> <766d85d7-e3d9-4c3d-87be-d5327ae3c764@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="ISO-8859-1" |
| Content-Transfer-Encoding | 7Bit |
| Injection-Date | Fri, 2 Jun 2017 20:21:59 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="ea746f34903e9052e847381d0dc76f5d"; logging-data="21879"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+O7RP5etHoTCWwpWKI2e5D" |
| User-Agent | KNode/4.14.5 |
| Cancel-Lock | sha1:9DatUNWndPGY33gy6vl0XhE7LF0= |
| Xref | csiph.com comp.graphics.apps.gnuplot:3661 |
Show key headers only | View raw
hugocoolens@gmail.com wrote: > Op donderdag 1 juni 2017 23:26:46 UTC+2 schreef Ethan A Merritt: >> hugocoolens@gmail.com wrote: >> >> > I have a data file with measurements, each measurement has been >> > repeated 5 times. However because of a bug in the apparatus software >> > the first and the second measurement are always unreliable, therefore I >> > want to skip them i.e. I don't want to plot these unreliable data >> > points, neither do I want to use them for fitting to a function. This >> > is an example: 1 >> > #unreliable 1.5 #unreliable 3 #reliable >> > 3.1 #reliable >> > 2.9 #reliable >> > #start of next 5 measurements: >> > 3 #unreliable >> > 3.1 #unreliable >> > 3.5 #reliable >> > 3.4 #reliable >> > 3.6 #reliable >> > >> > Can anyone here show me how to do is from within Gnuplot? >> > kind regards, >> > Hugo >> >> If it is always the first two measurements in the file, you can add "skip >> 2" to the plot or fit statement: >> >> plot "foo" skip 2 using 0:1 >> >> However your sample above seems to show that that there are multiple >> blocks of data in the file and in each block the first 2 records are bad. >> For this you could instead use >> >> plot "foo" every ::2 using 0:1 >> >> But note that you need a blank line between the data blocks for this to >> work (otherwise gnuplot does not know that new block of data is >> starting). >> >> See "help every" >> >> Ethan > > Thanks a lot for the reply. Adding an extra blank line is no too > difficult. Can I also use the "every" syntax in a fit statement? Yes. "plot" and "fit" both use exactly the same data input stage. > Could you provide an example? One of the examples in the fit demo uses "every 5" to select points http://gnuplot.sourceforge.net/demo_cvs/fit.html The demo "matrix_every.dem" may also be helpful (it's in the distributed demo collection but not one of the on-line examples). Ethan
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
skipping values in a data file "hugocoolens@gmail.com" <hugocoolens@gmail.com> - 2017-06-01 08:47 -0700
Re: skipping values in a data file Ethan A Merritt <sfeam@users.sourceforge.net> - 2017-06-01 14:26 -0700
Re: skipping values in a data file "hugocoolens@gmail.com" <hugocoolens@gmail.com> - 2017-06-02 02:39 -0700
Re: skipping values in a data file Ethan A Merritt <sfeam@users.sourceforge.net> - 2017-06-02 13:25 -0700
Re: skipping values in a data file "hugocoolens@gmail.com" <hugocoolens@gmail.com> - 2017-06-03 11:31 -0700
csiph-web