Geom for inla.mesh.1d objects
This function generates a geom_point object showing the knots (vertices) of a 1D mesh.
## S3 method for class 'inla.mesh.1d'
gg(data, mapping = aes_string("x", "y"), y = 0, shape = 4, ...)data |
An inla.mesh.1d object. |
mapping |
aesthetic mappings created by aes or aes_. These are passed on to geom_point. |
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 geom_point. |
An obbject generated by geom_point.
Other geomes for meshes:
gg.inla.mesh(),
gg(),
gm()
# Some features use the INLA package.
if (require("INLA", quietly = TRUE)) {
# Load INLA
library(INLA)
# Create a 1D mesh
mesh <- inla.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)
}Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.