Learn R Programming

inlabru (version 2.1.9)

glplot.SpatialPoints: Visualize SpatialPoints using RGL

Description

This function will calculate the cartesian coordinates of the points provided and use rgl.points() in order to render them.

Usage

# S3 method for SpatialPoints
glplot(object, add = TRUE, color = "red", ...)

Arguments

object

a SpatialPoints or SpatialPointsDataFrame object.

add

If TRUE, add the points to an existing plot. If FALSE, create new plot.

color

vector of R color characters. See rgl.material() for details.

...

Parameters passed on to rgl.points()

See Also

Other inlabru RGL tools: globe, glplot.SpatialLines, glplot.inla.mesh, glplot

Examples

Run this code
# NOT RUN {
if (require("rgl", quietly = TRUE) &&
    require("sphereplot", quietly = TRUE)) {

# Load pantropoical dolphin data

data("mexdolphin", package = "inlabru")

# Show the globe

globe()

# Add mesh, ship transects and dolphin sightings stored
# as inla.mesh, SpatialLines and SpatialPoints objects, respectively

glplot(mexdolphin$mesh)
glplot(mexdolphin$samplers)
glplot(mexdolphin$points)

}
# }

Run the code above in your browser using DataLab