W <- Window(chorley)
opa <- par(mfrow=c(2,5))
plot(as.mask(W, dimyx=10), col="grey", main="sample")
plot(W, add=TRUE, lwd=3, border="red")
plot(owin2mask(W, "ma", dimyx=10), col="grey", main="majority")
plot(W, add=TRUE, lwd=3, border="red")
plot(owin2mask(W, "i", dimyx=10), col="grey", main="inside")
plot(W, add=TRUE, lwd=3, border="red")
plot(owin2mask(W, "c", dimyx=10), col="grey", main="cover")
plot(W, add=TRUE, lwd=3, border="red")
plot(owin2mask(W, "b", dimyx=10), col="grey", main="boundary")
plot(W, add=TRUE, lwd=3, border="red")
plot(as.mask(complement.owin(W), dimyx=10), col="grey",
main="notsample")
plot(W, add=TRUE, lwd=3, border="red")
plot(owin2mask(W, "mi", dimyx=10), col="grey", main="minority")
plot(W, add=TRUE, lwd=3, border="red")
plot(owin2mask(W, "o", dimyx=10), col="grey", main="outside")
plot(W, add=TRUE, lwd=3, border="red")
plot(owin2mask(W, "u", dimyx=10), col="grey", main="uncover")
plot(W, add=TRUE, lwd=3, border="red")
plot(owin2mask(W, "b", dimyx=10), col="grey", main="boundary")
plot(W, add=TRUE, lwd=3, border="red")
par(opa)
Run the code above in your browser using DataLab