Re: Time series. [message #80110 is a reply to message #80106] |
Wed, 02 May 2012 07:54   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Wednesday, May 2, 2012 7:39:10 AM UTC-6, dave poreh wrote:
> On Tuesday, May 1, 2012 8:57:45 PM UTC+2, Chris Torrence wrote:
>> On Monday, April 30, 2012 3:26:44 AM UTC-6, dave poreh wrote:
>>> On Monday, April 30, 2012 9:31:59 AM UTC+2, Mats Löfdahl wrote:
>>>> Den måndagen den 30:e april 2012 kl. 09:15:45 UTC+2 skrev dave poreh:
>>>> > Folks
>>>> > hi,
>>>> > I am doing some Time series analysis and i wish to plot the mean like ( http://imageshack.us/content_round.php?page=done&l=img20 7/6577/screenshotat20120430091.png). I mean i want to plot the *BLUE* points in this graph. i have tryed to do with:
>>>> > Smooth(y, 33)
>>>> >
>>>> > but the result is not what i want. Is there any help on Time series expert please?
>>>> > Cheers,
>>>> > Dave
>>>>
>>>> I think you want to bin your data and then plot the mean y value within each bin vs the mid x point.
>>> Thanks. Now i am thinking about: http://idlastro.gsfc.nasa.gov/idl_html_help/TS_SMOOTH.html
>>>
>>> Cheers,
>>> Dave :-)
>>
>> Hi Dave,
>>
>> At the risk of getting flamed, you can use the undocumented "NSUM" keyword to the PLOT function:
>>
>> r = randomn(s,1000) + findgen(1000)/300
>> void = LINFIT(findgen(1000),r,YFIT=yfit)
>> p = plot(r, 'or', /SYM_FILLED, SYM_SIZE=0.5, NAME='Red data')
>> p1 = plot(r, 'ob', /SYM_FILLED, /OVERPLOT, NAME='Smoothed', nsum=20, /undoc)
>> p2 = plot(yfit, 'g3', /OVERPLOT, NAME='Linear fit')
>> l = legend(POSITION=[0.8,0.3])
>>
>> In this case, setting NSUM=20 just does a simple average of every 20 points and only plots a single point. Here's what it looks like:
>> http://www.flickr.com/photos/79705059@N06/6986758828/
>>
>> Cheers,
>> Chris
>> ExelisVIS
> Dear Chris
> hi
> How could i get the *blue* number for the graph?
> Cheers,
> Dave
Hi Dave,
If you mean get the actual averaged numbers back out of the graph, you can't. Hence the reason for Ken's comment. That NSUM is purely used for visual results, although it would be easy to replicate the result using a simple binned average.
Cheers,
Chris
|
|
|