Learn R Programming

inlabru (version 2.1.1)

glplot.inla.mesh: Visualize SpatialPoints using RGL

Description

This function transforms the mesh to 3D cartesian coordinates and uses inla.plot.mesh() with rgl=TRUE to plot the result.

Usage

# S3 method for inla.mesh
glplot(object, add = TRUE, col = NULL, ...)

Arguments

object

an inla.mesh object.

add

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

col

Color specification. A single named color, a vector of scalar values, or a matrix of RGB values.

...

Parameters passed on to plot.inla.mesh()

See Also

Other inlabru RGL tools: globe, glplot.SpatialLines, glplot.SpatialPoints, glplot

Examples

Run this code
# NOT RUN {
# Load rgl library (needed due to a bug in sphereplot library)

library(rgl)

# Load pantropoical dolphin data

data("mexdolphin")

# 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