[R] distinguish regression lines in grouped, black and white lattice xyplot

Deepayan Sarkar deepayan.sarkar at gmail.com
Thu Jun 25 00:24:00 CEST 2009


On Wed, Jun 24, 2009 at 2:05 PM, Katharina
May<may.katharina at googlemail.com> wrote:
> That's a point. I justed wanted to provide an overview for myself to
> see the tendencies in a direct comparement
> and with an easy way to distinct them, but maybe the text panel can
> help me with that...
>
> Well anyway, is it right that a grouped black and white plot can
> contain a maxinum of 8 distinguishable  lines or might
> there be a way to increase that?

There's no limitation of 8 (I'm not sure where you got that; ?par
doesn't say that). For example,

xyplot((y + g) ~ x, groups = g, data = expand.grid(x = 1:10, y = 1, g
= 1:20), type = "l",
       lty = c("22", "42", "62", "82", "A2", "C2", "E2", "26", "46",
"66", "86", "A6", "C6", "E6"),
       col = "black")

> I know some graphics from papers containing lines with equally
> distance points on the lines (one type of point per line)
> as a form of distinction. Can this be realised using grouped lattice
> plots with regression lines?

Not directly. You will need to pre-compute the points on the lines and
plot them as regular points, with type="o" to join them by lines.

-Deepayan




More information about the R-help mailing list