Section 31 Numerics & Factor: coplot

This function coplot produces two variants of the conditioning plots.

31.1 Coplot: Example 1

data(iris)

coplot(Sepal.Length ~ Sepal.Width | Petal.Length, data=iris)

31.2 Coplot: Example 2

data(quakes)

coplot(lat ~ long | depth, data = quakes)

given.depth <- co.intervals(quakes$depth, number = 4, overlap = .1)
coplot(lat ~ long | depth, data = quakes, given.v = given.depth, rows = 1)

31.3 Coplot: Example 3

Conditioning on two factors

data(warpbreaks)

Index <- seq(length = nrow(warpbreaks)) # to get nicer default labels
coplot(breaks ~ Index | wool * tension, data = warpbreaks,
       show.given = 0:1)

coplot(breaks ~ Index | wool * tension, data = warpbreaks,
       col = "red", bg = "pink", pch = 21,
       bar.bg = c(fac = "light blue"))