[R] stl and the relative scale data-seasonal

Spencer Graves spencer.graves at pdf.com
Sun Nov 19 14:07:19 CET 2006


      I'm not sure I understand what you want.  However, I will suppose 
I wanted essentially the same image as plot(stl..) but with individual 
control over ylim for each of the 4 plots.  In that case, I might make a 
local copy of the actual plot function using 'getAnywhere("plot.stl")' 
and modify it.  I got to the point by noting that "plot" in most cases 
calls 'UseMethod("plot")'.  This suggested I check 'methods("plot")'.  
The response to this included 'plot.stl', which would be called by 
'UseMethod("plot")' whenever the first argument of 'plot' was of class 
'stl'. 

      Then I'd modify my local copy of 'plot.stl' to produce what I 
wanted (using 'debug' to walk through the code line by line if my 
modifications didn't work right and I didn't understand immediately 
why).  This may be as much work as "extracting all the components and 
plot 4 separate figures", but I see no simpler way. 

      Hope this helps. 
      Spencer Graves
p.s.  By 'debug' here, I mean the 'debug' in the 'base' package, not the 
'debug' package, which I've never used but is doubtless more powerful 
(though may also require more effort and thought from the user).  For 
more information on debug{base}, I suggest you consult the documentation 
and perhaps the archives.  RSiteSearch("graves debug") produced 127 hits 
for me just now.  The most interesting for you among the first few might 
be "http://finzi.psych.upenn.edu/R/Rhelp02a/archive/79251.html". 

Berta wrote:
> I am trying to plot the time series decomposition using plot(stl..). 
> Eventhough I understand why the scale of the 4 plots is better to be 
> unequal, I would like to plot all 4  in the same scale (otherwise 
> interpretation at a simple look may be misleading). Is there a way I could 
> do so (easier than extracting all the components and plot 4 separate figures 
> using 4 plot-comands)?
>
> Thanks a lot in advance.
>
> Berta.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list