plot.owin {spatstat} | R Documentation |
Plot a two-dimensional window of observation for a spatial point pattern
## S3 method for class 'owin': plot(x, main, add=FALSE, ..., box, edge=0.04)
x |
The window to be plotted.
An object of class owin ,
or data which can be converted into
this format by as.owin() .
|
main |
text to be displayed as a title above the plot. |
add |
logical flag: if TRUE , draw the window in
the current plot; if FALSE , generate a new plot.
|
... |
extra arguments passed to the generic plot function.
|
box |
logical flag; if TRUE , plot the enclosing rectangular box
|
edge |
nonnegative number; the plotting region will have coordinate limits
that are 1 + edge
times as large as the limits of the rectangular box
that encloses the pattern.
|
This is the plot
method for the class owin
.
The action is to plot the boundary of the window on the current plot device,
using equal scales on the x
and y
axes.
If the window x
is of type "rectangle"
or "polygonal"
,
the boundary of the window is plotted as a polygon or series of polygons.
If x
is of type "mask"
the discrete raster approximation of the window is displayed
as a binary image (white inside the window, black outside).
Graphical parameters controlling the display (e.g. setting the
colours) may be passed directly via the ...
arguments,
or indirectly reset using
spatstat.options
.
When x
is of type "rectangle"
or "polygonal"
,
it is plotted by the R function polygon
. To control the
appearance (colour, fill density, line density etc) of the polygon
plot, determine the required argument of polygon
and pass it through ...
When x
is of type "mask"
, it is plotted by
image.default
. The appearance of the image plot
can be controlled by passing arguments to image.default
through ...
. The default appearance can also be changed
by setting the parameter par.binary
of spatstat.options
.
none.
Adrian Baddeley adrian@maths.uwa.edu.au http://www.maths.uwa.edu.au/~adrian/ and Rolf Turner rolf@math.unb.ca http://www.math.unb.ca/~rolf
owin.object
,
plot.ppp
,
polygon
,
image.default
,
spatstat.options
## Not run: # 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) spatstat.options(par.binary=list(col=grey(c(0.5,1)))) plot(we) ## End(Not run)