Plot a Spatial Window
Plot a two-dimensional window of observation for a spatial point pattern
plot.owin(x, main, ..., box=TRUE, edge=0.04)
- The window to be plotted.
An object of class
owin, or data which can be converted into this format by
- text to be displayed as a title above the plot.
- extra arguments passed to the generic
- logical flag; if
TRUE, plot the enclosing rectangular box
- nonnegative number; the plotting region will have coordinate limits
1 + edgetimes as large as the limits of the rectangular box that encloses the pattern.
This is the
plot method for the class
The action is to plot the boundary of the window on the current plot device,
using equal scales on the
If the window
x is of type
the boundary of the window is plotted as a polygon or series of polygons.
x is of type
the discrete raster approximation of the window is displayed
as a binary image (white inside the window, black outside).
library(spatstat) # rectangular window data(nztrees) plot(nztrees$window) abline(v=148, lty=2) # polygonal window plot(c(0,1),c(0,1),type="n") bdry <- locator() # click the vertices of a polygon (anticlockwise) w <- owin(c(0,1), c(0,1), poly=bdry) plot(w) # binary mask we <- erode.owin(w, 0.05, FALSE) plot(we)