Conditioning Plots/Scatter Plots

USAGE:
xyplot(formula, ...)

The following arguments have special meaning within this function. The common meanings for these and all other arguments are listed separately under trellis.args.

formula:
a formula in the form y ~ x | g1 * g2 * ... however the given variables g1, g2, ... may be omitted. The x and y values in formula should both be numeric.

VALUE:
an object of class trellis, which is automatically plotted by print.trellis.

SEE ALSO:
panel.xyplot , trellis.args .

EXAMPLES:
EE <- equal.count(ethanol$E, number = 9, overlap = 0.25)
xyplot(NOx ~ C | EE, data = ethanol,
       prepanel = function(x, y) prepanel.loess(x, y, span = 1),
       panel = function(x, y) {
                 panel.grid(h = 2)
                 panel.xyplot(x, y)
                 panel.loess(x, y, span = 1)
        },
        aspect = 2.5, # banking to 45 deg. makes aspect too big
        layout = c(5, 2),
        xlab = "Compression Ratio", ylab = "NOx (micrograms/J)")

xyplot(incidence ~ year, data = melanoma, aspect="xy", xlab = "Year", ylab = "Incidence", ylim = c(0,5))

states <- data.frame(state.x77, state.name = dimnames(state.x77)[[1]], state.region = state.region) xyplot(Murder ~ Population | state.region, data = states, groups = as.character(state.name), panel = function(x, y, subscripts, groups) text(x, y, groups[subscripts]))