Graph followup (was Re: [R] [?] ARIMA in R

Uwe Ligges ligges at statistik.uni-dortmund.de
Mon Aug 14 08:27:39 CEST 2000


Paul E Johnson wrote:
> 
> From Adrian Trapletti
> > > library(ts)
> > > data(LakeHuron)
> > > arima0(LakeHuron, order=c(2,0,0), xreg=1:98)
> >
> > What about
> >
> > md <- arima0(LakeHuron, order=c(2,0,0), xreg=1:98)
> > plot(LakeHuron)
> > lines(LakeHuron-md$resid,col="red")
> >
> > Adrian
> 
> 1 . Why does this work to plot the 2 lines on the same graph?  It seems
> like whenever I want to overlay two lines, I have to do
>  par("new"=TRUE)
> in order to get the second graph on top of the first.

You need par("new"=TRUE) only to overlay graphs produced by "hplot"
High-Level Plots (e.g. plot(.), hist(.), pairs(.)).

To add elements to an existing plot, you can choose "aplot" functions
(e.g. lines(.), axis(.), legend(.)).

Have a look to the keywords in "Search Engine & Keywords" after invoking
help.start().

> 2. Is there any way to scroll through a history of graphs that have
> appeared. Often I'm snooping through data and want to compare one graph
> with the one before, and it is puzzling that I can't find a way.

Have a look to ?recordPlot.
On Windows you can choose "history"-"recording" in the menu and scroll
through the graphs using the PageUp/Down keys.


Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list