[R] Adding abline in Lattice graph
Dieter Menne
dieter.menne at menne-biomed.de
Fri Feb 13 14:08:19 CET 2009
Sundar Dorai-Raj <sdorairaj <at> gmail.com> writes:
>
> Sorry, that was my lack of understanding on how coplot works.
> Try the following:
>
> coplot(lbxglu~lbxgh|eth, data = reg.dat.5,
> panel= function(...) {
> panel.smooth(...)
> abline(h = 126, col = "red")
> abline(v = 6.5, col = "blue")
> },
> xlab="ABC", ylab="FBG")
>
No, it was not your lack of understanding. Since the original poster
did not provide sample data (too much work?), you had to provide
untested code.
Function coplot is standard graphics, not lattice, so panels do not
work here.
Dieter
More information about the R-help
mailing list