plot.sp2 | R Documentation |
Plot a point pattern on the sphere, and its window of observation.
## S3 method for class 'sp2' plot(x, ..., eye, top, add = FALSE) ## S3 method for class 'sp3' plot(x, ..., eye, top, add = FALSE)
x |
Point pattern on the sphere (object of class |
... |
Graphical parameters passed to lower-level plot functions. |
eye |
Spatial position of the viewer. Either a numeric vector
of length 2 (interpreted as giving colatitude and longitude
respectively in radians),
or a numeric vector of length 3 (interpreted as the
three-dimensional Cartesian coordinates) or a list with entries
|
top |
Location on the sphere that should be at the top of the plot.
Same format as |
add |
Logical value indicating whether to add the points to an
existing spherical plot.
This will only work correctly if the same
values of |
Only points that are visible from the eye
position
are plotted (i.e. all points x for which d(x,eye) <= pi*rho/2, where rho is the radius of the sphere). That is, points on the other side of the sphere
are not displayed (i.e. all points y for which d(x,eye) > pi*rho/2).
Null.
Adrian Baddeley.
plot.sphwin
for plotting the window only.
sp2
, sp3
sphcap <- sphwin(type="band", param=c(0, pi/3), ref=c(pi/8,pi/6)) X <- runif.sphwin(n=150, win=sphcap, as.sp=TRUE, ndim="2") plot(X) plot(X$win, col="pink") plot(X, add=TRUE, pch=".", cex=4, col="blue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.