gg.fm_mesh_1d {inlabru} | R Documentation |
Geom for fm_mesh_1d objects
Description
This function generates a geom_point
object showing the knots (vertices)
of a 1D mesh.
Requires the ggplot2
package.
Usage
## S3 method for class 'fm_mesh_1d'
gg(
data,
mapping = ggplot2::aes(.data[["x"]], .data[["y"]]),
y = 0,
shape = 4,
...
)
## S3 method for class 'inla.mesh.1d'
gg(
data,
mapping = ggplot2::aes(.data[["x"]], .data[["y"]]),
y = 0,
shape = 4,
...
)
Arguments
data |
An inla.mesh.1d object. |
mapping |
aesthetic mappings created by |
y |
Single or vector numeric defining the y-coordinates of the mesh knots to plot. |
shape |
Shape of the knot markers. |
... |
parameters passed on to |
Value
An object generated by geom_point
.
Functions
-
gg(inla.mesh.1d)
: Alias forgg.fm_mesh_1d
, supportinginla.mesh.1d
objects.
See Also
Other geomes for meshes:
gg()
,
gg.fm_mesh_2d()
,
gm()
Examples
if (require("fmesher", quietly = TRUE) &&
require("ggplot2", quietly = TRUE)) {
# Create a 1D mesh
mesh <- fm_mesh_1d(seq(0, 10, by = 0.5))
# Plot it
ggplot() +
gg(mesh)
# Plot it using a different shape and size for the mesh nodes
ggplot() +
gg(mesh, shape = "|", size = 5)
}
[Package inlabru version 2.11.1 Index]