RE: How to add trend line over Coyote graphics plot [message #81062] |
Sat, 11 August 2012 23:13 |
Baro
Messages: 19 Registered: May 2012
|
Junior Member |
|
|
Hello David
Thank You very much
The problem is I was facing at the time is that the Linear line is not going through the points as I expected, I thought it is the function problem, but later i found where the bug is. Here is my code for plotting the LINFIT
format = LABEL_DATE(DATE_FORMAT=['%M%Y'])
Trend_Coeff = LINFIT(Date,Region4)
YFIT = Trend_coeff[0] + Trend_coeff[1]*Date
Date = julday(N,0,Y)
cgoplot,Date,YFit,color='red',linestyle=2,thick=2,/addcmd
Guta
|
|
|
RE: How to add trend line over Coyote graphics plot [message #81063 is a reply to message #81062] |
Sat, 11 August 2012 23:13  |
Baro
Messages: 19 Registered: May 2012
|
Junior Member |
|
|
Hello David
Thank You very much
The problem is I was facing at the time is that the Linear line is not going through the points as I expected, I thought it is the function problem, but later i found where the bug is. Here is my code for plotting the LINFIT
format = LABEL_DATE(DATE_FORMAT=['%M%Y'])
Trend_Coeff = LINFIT(Date,Region4)
YFIT = Trend_coeff[0] + Trend_coeff[1]*Date
Date = julday(N,0,Y)
cgoplot,Date,YFit,color='red',linestyle=2,thick=2,/addcmd
Guta
|
|
|
RE: How to add trend line over Coyote graphics plot [message #81064 is a reply to message #81063] |
Sat, 11 August 2012 23:13  |
Baro
Messages: 19 Registered: May 2012
|
Junior Member |
|
|
Hello David
Thank You very much
The problem is I was facing at the time is that the Linear line is not going through the points as I expected, I thought it is the function problem, but later i found where the bug is. Here is my code for plotting the LINFIT
format = LABEL_DATE(DATE_FORMAT=['%M%Y'])
Trend_Coeff = LINFIT(Date,Region4)
YFIT = Trend_coeff[0] + Trend_coeff[1]*Date
Date = julday(N,0,Y)
cgoplot,Date,YFit,color='red',linestyle=2,thick=2,/addcmd
Guta
|
|
|
Re: How to add trend line over Coyote graphics plot [message #81065 is a reply to message #81064] |
Sat, 11 August 2012 11:35  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
gutewaqi writes:
> I have a time series data where the X-axis is month and Y-axis
> is the value of my parameters. I plotted it using COYOTE GRAPHICS,
> I want to add a linear line, which shows a trend of my parameter
> over the time span considered, I tried it using LINFIT, but there
> is a problem that it considers the Julian day values as a
> number. Can any one help me Please?
A Julian day value *is* a number! I don't understand what
the problem can be. Can you provide some code?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|