Re: [R] adding horizontal lines to a trellis plot

From: Bert Gunter <gunter.berton_at_gene.com>
Date: Thu, 12 Jun 2008 11:11:10 -0700

 

Please read about panel functions in ?xyplot and ?panel.abline

In particular, you do this sort of thing in panel functions where you must use grid graphics functions or various lattice forms (wrappers) thereof. The standard graphics constructions will not work (as you found out).Suggested reference: Deepayan Sarkar's new book on lattice graphics.

-----Original Message-----
From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On Behalf Of Blanchard, Suzette
Sent: Thursday, June 12, 2008 10:52 AM
To: r-help_at_r-project.org
Subject: [R] adding horizontal lines to a trellis plot

I would like to add two horizontal lines representing acceptible drug levels to a trellis plot.
I tried using abline and I get an error that "plot.new has not been called." See below.  

xyplot(FK~WEEK|Event1/MRN, data=FKdat.o1)
abline(h=5)
abline(h=10)

Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) :   plot.new has not been called yet

Any help that can be provided on how to do this would be appreciated.  

Best,
Suzette  

Suzette Blanchard, Ph.D.
Assistant Professor, Dept. of Biostatistics City of Hope
1500 East Duarte Rd
Duarte, CA 91010-3000
ph: (626) 256-4673 ext:64446
sblanchard_at_coh.org  


SECURITY/CONFIDENTIALITY WARNING: \ This message an...{...{{dropped:8}}



R-help_at_r-project.org 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. Received on Thu 12 Jun 2008 - 20:43:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 12 Jun 2008 - 21:31:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive