## gnuplot-info

 [Gnuplot-info] How can I normalize my plots /read the value of the first data point From: sternenstaunerlaus - 2006-06-25 08:35:04 ```Hello, I am working on a scientific paper and I have started plotting my data using gnuplot. I have come to a point where I don't know how go on. Neither in your nor in other FAQs I found a clue to my problem: I want to plot different exponential decay-curves (from 1H-NMR-Measurements). The data curves start from different data points and decay nearly exponentially to zero. It is useful and common in this problem to normalize the curves to the first data point, i.e. to divide every y-value by the first y-value. By doing this, one gets exponential curves which start at y==1 and decay to y==0. This is helpful because only the shape of the decay-curve is interesting, not the absolute value. One simple solution would be to type "using \$1:(\$2/DP1)" where DP1 is a variable formely defined as value of the first data point. Unfortunately this doesn't help me, since I have more than 300 files to plot and it has to be done in an automatic way. Is there a way to read a certain value out of a set of Data (e.g. column 1, row 1)? Is there a different way to normalize the curves to the first data point? Thank you in advance for your help. Stephan (sternenstaunerlaus) -- View this message in context: http://www.nabble.com/How-can-I-normalize-my-plots--read-the-value-of-the-first-data-point-t1843451.html#a5032074 Sent from the Gnuplot - User forum at Nabble.com. ```
 Re: [Gnuplot-info] How can I normalize my plots /read the value of the first data point From: - 2006-06-25 17:30:05 ```sternenstaunerlaus wrote: > One simple solution would be to type "using \$1:(\$2/DP1)" where DP1 is a > variable formely defined as value of the first data point. > Unfortunately this doesn't help me, since I have more than 300 files to plot > and it has to be done in an automatic way. > > Is there a way to read a certain value out of a set of Data (e.g. column 1, > row 1)? Not inside gnuplot. But external tools can help, if you're doing this on a sane platform. You'll have to write a little script (in awk, Perl sh or something like those, depending on your personal preferences) that does the extraction job, and prints the number to stdout: DP1=`your_tool your_file.dat` ```