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

Re: processing data for gnuplot



On Wed, Dec 17, 2003 at 10:09:59PM +0530, Sridhar M.A. wrote:
> 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.  

I didn't know this, thanks! Doing a linear fit is going to be a bit
harder now...

David

-- 
Hi! I'm a .signature virus. Copy me into
your ~/.signature to help me spread!



Reply to: