Talk About Network

Google





Graphics > Gnuplot interactive function plotter > Plotting linear...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 3504 of 3655
Post > Topic >>

Plotting linear regression and getting the date to show up

by Kevin <hodgesk@[EMAIL PROTECTED] > Sep 10, 2008 at 04:42 PM

I'm trying to plot 2 things - the data point in the third column, and
then a regression line for that.
I can do that easy enough, but once I want to plot the month in the x-
axis - e.g. Jun,Jul,Aug


This data may look a little weird.  1 really represents Jan, 2 is
Feb.  I need to use actual number when doing the regression (it
doesn't work with a date field)

2008-01-01 1 0.68
2008-01-01 1 0.79
2008-02-01 2 0.62
2008-02-01 2 0.53
2008-03-01 3 0.48
2008-03-01 3 0.37

f(x) = a*x**2 + b*x + c;fit f(x) 'data.dat' using 2:3 via a,b,c

set xdata time
set timefmt "%Y-%m-%d"
set format x "%b"

plot  '/var/www/apache2-default/cap/data/predate2.dat' using 2:3
title '', f(x) title 'Projected Line'

How can I plot this seeing the data, the regression line, and have the
axis set to the month?
 




 3 Posts in Topic:
Plotting linear regression and getting the date to show up
Kevin <hodgesk@[EMAIL   2008-09-10 16:42:43 
Re: Plotting linear regression and getting the date to show up
Christoph Bersch <usen  2008-09-11 09:51:06 
Re: Plotting linear regression and getting the date to show up
=?ISO-8859-1?Q?Hans-Bernh  2008-09-11 20:57:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 23:31:45 PST 2009.