[R] par(new=T) with xyplot

Pikounis, V. Bill v_bill_pikounis at merck.com
Wed Jun 5 23:52:55 CEST 2002


I know I should not mix base plotting functions with grid/lattice functions,
but I have used a "quick-and-dirty" trick of par(new=T) in the past for
annotating a trellis-drawn graph in various versions of S-PLUS.  The
sequence goes something like this:

> windows(width = 5, height = 5, pointsize = 10)  # open up the device

> xyplot(y ~ x)  
> par(new=T)
> xyplot(y2 ~ x)
> par(new=F)  

Using R 1.5.0 in Windows, I tried this for the first time today, and the
par(new=T) setting appears to be ignored by the second xyplot call; i.e.,
the frame is cleaned and only the second printing of xyplot appears on the
device.  (If instead of the second xyplot I use a base plot function like
plot.default, the frame is not cleaned, which I want to happen). 

Is there anything analogous to par(new=T) that I could use to achieve this
behavior of "not cleaning the frame" with lattice commands? Any workaround
or advice is appreciated.  

Thanks in advance,
Bill
----------------------------------------
Bill Pikounis, Ph.D.
Biometrics Research Department
Merck Research Laboratories
PO Box 2000, MailDrop RY70-38  
## Please note that as of Wed 12 Jun 2002
## MailDrop will be RY84-16
126 E. Lincoln Avenue
Rahway, New Jersey 07065-0900
USA

v_bill_pikounis at merck.com

Phone: 732 594 3913
Fax: 732 594 1565



------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message.  If you are not the intended recipient, and have received this message in error, please immediately return this by e-mail and then delete it.

==============================================================================

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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