[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: processing data for gnuplot



On Wed, Dec 17, 2003 at 07:47:22AM -0700, Paul E Condon wrote:
   > On Wed, Dec 17, 2003 at 01:57:22PM +0100, David Fokkema wrote:
   > > 
   > > I was not entirely sure what to put in the subject line...
   > > 
Sorry I missed your original post.
   
   > > I did a very simple physics experiment involving two strings, two
   > > weights and one pulley. I'll spare you the details, but by varying one
   > > of the two masses, I measured the angle one of the strings made with the
   > > vertical. I got these results:
   > > 
   > > # m2      alpha
   > > 0       0
   > > 10      12
   > > 20      23
   > > 30      32
   > > 15      18
   > > 25      27
   > > 12      14
   > > 22      24
   > > 27      29
   > > 17      20
   > > 
   > > where the first column is the mass of the second weight and alpha is the
   > > angle, in which I made an error of ±1 degree. So far, so good.
   > > 
   > > Now, I want to plot in gnuplot the following: m2 along the x-axis, but
   > > the tangent of alpha with errorbars along the y-axis. So, I have to
   > > process this data somewhat further to obtain a second data file with
   > > three columns: m2, tan alpha-low, tan alpha-high.
   > > 
Gnuplot itself can handle these things: I just copied your data into a
file test.dat, ran gnuplot and issued this command:

 gnuplot> plot "test.dat" using ($1):(tan($2)

Plots m2 vs tan(alpha). Play around these and you can do most of things
from within gnuplot itself.  

Regards,

-- 
Sridhar M.A.                            GPG KeyID : F0225B2C
  Fingerprint: F7CC 61A8 C6C1 D29C 2863  4E20 8A78 A19D F022

And 1.1.81 is officially BugFree(tm), so if you receive any bug-reports
on it, you know they are just evil lies.
	-- Linus Torvalds

Attachment: pgpQ_lKGB9gxz.pgp
Description: PGP signature


Reply to: