[R] newbie graphics question

Arlin Stoltzfus arlin at carb.nist.gov
Wed Aug 29 15:47:39 CEST 2001


Wolfgang Viechtbauer wrote:
> 
> > I need to plot two lines on the same graph. I do
> > plot(x,y)
> > then
> > plot(x,z,add=TRUE)
> 
> Maybe try using the par(new=TRUE) parameter, as in:
> 
> plot(x,y)
> par(new=TRUE)
> plot(x,z)

This works, but isn't the real issue here why the help indicates 
that graphics parameters set by par can also be passed as arguments 
to "plot", when in fact this isn't true?  That is, according to 
the help, I ought to be able to set "new" like this: 

 > plot ( x, y1 )
 > plot ( x, y2, new=TRUE )
 Warning messages: 
 1: parameter "new" couldn't be set in high-level plot() function 
 2: parameter "new" couldn't be set in high-level plot() function 
 3: parameter "new" couldn't be set in high-level plot() function 
 4: parameter "new" couldn't be set in high-level plot() function 
 5: parameter "new" couldn't be set in high-level plot() function 
 6: parameter "new" couldn't be set in high-level plot() function 

but this doesn't work.

Arlin
-- 
Arlin Stoltzfus (arlin at carb.nist.gov)
 Research Biologist, NIST; Adj. Asst. Prof., UMBI
CARB, 9600 Gudelsky Dr., Rockville, Md 20850
ph. 301 738-6208; fax 301 738-6255; http://www.molevol.org/camel
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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