Streudiagramme

Streudiagramme werden in lattice mit der Funktion xyplot() angelegt:

xyplot(x, data,
       allow.multiple = is.null(groups) || outer,
       outer = !is.null(groups),
       auto.key = FALSE,
       aspect = "fill",
       panel = lattice.getOption("panel.xyplot"),
       prepanel = NULL,
       scales = list(),
       strip = TRUE,
       groups = NULL,
       xlab, xlim,
       ylab, ylim,
       drop.unused.levels = lattice.getOption("drop.unused.levels"),
       ...,
       lattice.options = NULL,
       default.scales,
       subscripts = !is.null(groups),
       subset = TRUE)

Die Arbeit wird größtenteils von der Panel-Funktion panel.xyplot() übernommen:

panel.xyplot(x, y, type = "p", groups = NULL, pch, col, col.line, col.symbol, font, fontfamily, fontface, lty, cex, fill, lwd, horizontal = FALSE, ..., jitter.x = FALSE, jitter.y = FALSE, factor ...

Get R in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.