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?


|