Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #935
| From | Péter Juhász <peter.juhasz83@gmail.com> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: How to plot data relative to a specific data point |
| Date | 2012-02-10 10:12 -0800 |
| Organization | http://groups.google.com |
| Message-ID | <22c2db05-16c6-472e-a450-99c66ad884ae@gi10g2000vbb.googlegroups.com> (permalink) |
| References | <43950b82-c09e-4e85-8863-a175abfdf84f@uc9g2000pbc.googlegroups.com> |
On Feb 10, 6:42 pm, Tom Gederberg <tgederb...@gmail.com> wrote: > I know this is probably a stupid question but I have not been able to > find the answer anywhere. > > Suppose I have a data file that looks like: > > Time Value1 Value2 Value3 > > 568744.0 -3.2 5.4 8.8 > 568744.2 9.1 8.1 -3.5 > . . . . > . . . . > . . . . > 568423.0 5.7 6.1 7.7 > > I want to plot the data against time, but want time starting at 0, not > 568744.0. > > I know I can say > plot "data.txt" u ($1 - 568774.0):2 w lines > > but is there a way to tell gnuplot to refer to the first time value > (something like $1(0)). Does this question make sense? first=0 plot 'data.txt' u (first=($0==1?$1:first),$1-first):2 Péter Juhász
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Find similar
How to plot data relative to a specific data point Tom Gederberg <tgederberg@gmail.com> - 2012-02-10 09:42 -0800 Re: How to plot data relative to a specific data point Péter Juhász <peter.juhasz83@gmail.com> - 2012-02-10 10:12 -0800
csiph-web