plot.sphppm | R Documentation |
Plot the fitted intensity of a point process model as an image wrapped on the sphere.
## S3 method for class 'sphppm' plot(x, eye = place("nedlands"), top = place("northpole"), w, ..., eps = NULL, dimyx = NULL, main = "", action = c("image", "contour", "imagecontour"), col.image = NULL, col.lines = NULL)
x |
Fitted point process model on the sphere (object of class |
eye |
Viewpoint. A vector of length 3 (or a pair of
|
top |
Vector of length 3 (or a pair of |
w |
Spherical window (object of class |
... |
Additional arguments controlling the plot, passed
to |
eps,dimyx |
Arguments passed to |
main |
Main title. A character string, character vector, or expression. |
action |
Character string specifying how the fitted intensity should be plotted. See Details. |
col.image |
Optional. A vector of colour values (a character vector which can be
interpreted as colours) or an object of class |
col.lines |
Optional. A single colour (a character string or integer
which can be interpreted as a colour)
to be used for the contour lines, if
|
This function computes the intensity of the fitted model x
at essentially every location on the sphere, and produces a
colour image plot and/or contour plot, showing the sphere
viewed from a particular spatial position.
Options are action="image"
to produce a colour image,
action="contour"
for a contour plot, and
action="imagecontour"
for both a colour image with contour
lines superimposed.
The algorithm runs as follows: First
the intensity of the fitted model x
is computed at
a fine grid of locations on the sphere. Those grid locations which are
visible from the viewing location eye
are projected onto
a two-dimensional plane. The values at these projected locations are
interpolated onto a two-dimensional rectangular pixel grid by
kernel smoothing, using Smooth.ppp
, with a very small
bandwidth sigma
. The resulting two-dimensional pixel image is
then plotted by plot.im
and/or a contour map is drawn
by contour.im
.
To control colours in the plot, the argument col
can be used if
this is unambiguous (i.e. if action="image"
or
action="contour"
). Otherwise the arguments col.image
and col.lines
determine the colours used in the
image and contour plots, respectively.
Note that the plot shows the half of the sphere that is visible from the eye position (i.e. all locations u for which d(u,eye) <= pi*rho/2, where rho is the radius of the sphere).
Null.
Adrian Baddeley.
sphppm
,
predict.sphppm
XX <- runif.sphwin(100) fit <- sphppm(XX ~ x1+ x2 + x3) plot(fit) plot(fit, dimyx=256) globedrawlong(seq(0, 350, by=10)) globedrawlat(seq(-80,80,by=10)) plot(fit, dimyx=256, col=heat.colors(128)) plot(fit, dimyx=256, action="contour", col="green") plot(fit, dimyx=256, action="imagecontour", col.image=topo.colors(128), col.lines="white")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.