Learn R Programming

inlabru (version 2.8.0)

glplot.SpatialLines: Visualize SpatialLines using RGL

Description

This function will calculate a cartesian representation of the lines provided and use lines3d() in order to render them.

Usage

# S3 method for SpatialLines
glplot(object, add = TRUE, ...)

Arguments

object

a SpatialLines or SpatialLinesDataFrame object.

add

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

...

Parameters passed on to lines3d().

See Also

Other inlabru RGL tools: globe(), glplot.SpatialPoints(), glplot.inla.mesh(), glplot()

Examples

Run this code
if (FALSE) {
if (bru_safe_inla() &&
  require("rgl", quietly = TRUE) &&
  require("sphereplot", quietly = TRUE) &&
  bru_safe_sp()) {

  # 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