Colour everything outside a given polygon.
antipolygon.Rd
This routine does the inverse of 'polygon': it colours everything outside a given polygnon. This may be useful for e.g. blanking out a plot outside certain borders. This routine is quite simple and may not work under all circumstances.
Usage
antipolygon(data,xylim=DomainExtent(.Last.domain()), bg='white')
Arguments
- data
A polygon (x and y columns).
- bg
Colour to use.
- xylim
Boundaries for the 'antipolygon'. Usually the boundaries of the presentt plot.
Examples
if (FALSE) {
mask <- project(map("world","Belgium",fill=0,plot=FALSE))
xylim <- DomainExtent(datafield)
antipolygon(mask,xylim=xylim)
}