data(segdata)
par(mfrow = c(2, 4), mar = c(0, 1, 0, 1))
for (i in 1:8) {
full <- data.frame(segdata)[,(2 * i)-1] == 100
half <- data.frame(segdata)[,(2 * i)-1] == 50
plot(segdata)
plot(segdata[full,], col = "Black", add = TRUE)
if (any(half))
plot(segdata[half,], col = "Grey", add = TRUE)
text(5, 11.5, labels = paste("Pattern", LETTERS[i]))
}
Run the code above in your browser using DataLab