Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3662
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2017-06-03 11:31 -0700 |
| References | <1137a62e-23b6-4d9e-8b9f-62e034b6f9db@googlegroups.com> <ogq0k3$ge$1@dont-email.me> <766d85d7-e3d9-4c3d-87be-d5327ae3c764@googlegroups.com> <ogshd7$lbn$1@dont-email.me> |
| Message-ID | <5624f631-2223-453f-a317-f49c9cf488ce@googlegroups.com> (permalink) |
| Subject | Re: skipping values in a data file |
| From | "hugocoolens@gmail.com" <hugocoolens@gmail.com> |
Op vrijdag 2 juni 2017 22:25:31 UTC+2 schreef Ethan A Merritt: > 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 Thanks a lot for pointing me to the example Kind regards, Hugo
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous 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