On Apr 8, 2010, at 11:07 PM, Wen Huang wrote:

Hi,

I wonder if anyone knows how to control color and darkness of the background grid generated by ' type = c("g", "p") ' in a lattice plot (e.g., in xyplot). The documentation does not seem to offer a way to change them.


I wonder.

Here's what I see based on the documentation
?panel.grid
# has col.line as one of 6 arguments ... so ...
# with the example in ?xyplot ...
# -------------
EE <- equal.count(ethanol$E, number=9, overlap=1/4)
## Constructing panel functions on the fly; prepanel
xyplot(NOx ~ C | EE, data = ethanol,
       prepanel = function(x, y) prepanel.loess(x, y, span = 1),
       xlab = "Compression Ratio", ylab = "NOx (micrograms/J)",
       panel = function(x, y) {
           panel.grid(h=-1, v= 2, col.line="red", lty=3)
           panel.xyplot(x, y)
           panel.loess(x,y, span=1)
       },
       aspect = "xy")

Seems to alter "them", at least to the minimal extent of the offered explanation.

--
David
--

David Winsemius, MD
West Hartford, CT

______________________________________________
[email protected] 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.

Reply via email to