plot.inla.mesh {INLA} | R Documentation

## Draw a triangulation mesh object

### Description

since `⁠23.08.18⁠`. Use `fmesher::plot.fm_mesh_2d()` or `fmesher::plot_rgl()` instead.

Plots an `inla.mesh()` object using either standard graphics or with `rgl`.

### Usage

    ## S3 method for class 'inla.mesh'
    plot(
      x,
      col = "white",
      t.sub = seq_len(nrow(x$graph$tv)),
      add = FALSE,
      lwd = 1,
      xlim = range(x$loc[, 1]),
      ylim = range(x$loc[, 2]),
      main = NULL,
      rgl = FALSE,
      size = 2,
      draw.vertices = FALSE,
      vertex.color = "black",
      draw.edges = TRUE,
      edge.color = rgb(0.3, 0.3, 0.3),
      draw.segments = draw.edges,
      ...
    )

### Arguments

`x` | An `inla.mesh()` object.
`col` | Color specification. A single named color, a vector of scalar values, or a matrix of RGB values. Requires `rgl=TRUE`.
`t.sub` | Optional triangle index subset to be drawn.
`add` | If `TRUE`, adds to the current plot instead of starting a new one.
`lwd` | Line width for triangle edges.
`xlim` | X-axis limits.
`ylim` | Y-axis limits.
`main` | The main plot title. If not specified, a default title is generated based on the mesh type.
`rgl` | When `TRUE`, generates an `rgl` plot instead of a generic graphics plot. Allows 3D plotting and color surface plotting.
`size` | Size of vertex points in `rgl` plotting. See `rgl.material`.
`draw.vertices` | If `TRUE`, draw triengle vertices.
`vertex.color` | Color specification for all vertices.
`draw.edges` | If `TRUE`, draw triangle edges.
`edge.color` | Color specification for all edges.
`draw.segments` | If `TRUE`, draw boundary and interior constraint edges more prominently.
`...` | Further graphics parameters, interpreted by the respective plotting systems.

### Author(s)

Finn Lindgren finn.lindgren@gmail.com

### See Also

`plot.inla.trimesh()`

### Examples

    mesh <- inla.mesh.create(globe = 10)
    plot(mesh)

    if (require(rgl)) {
      plot(mesh, rgl = TRUE, col = mesh$loc[, 1])
    }

[Package INLA version 26.08.22 Index]