This function generates a geom_point object showing the knots (vertices)
of a 1D mesh.
Requires the ggplot2 package.
Arguments
- data
An fmesher::fm_mesh_1d object.
- mapping
aesthetic mappings created by
aes. These are passed on togeom_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.
See also
Other geomes:
gg(),
gg.RasterLayer(),
gg.SpatRaster(),
gg.Spatial,
gg.data.frame(),
gg.fm_mesh_2d(),
gg.matrix(),
gg.sf()
Examples
# \donttest{
if (require("fmesher", quietly = TRUE) &&
require("ggplot2", quietly = TRUE)) {
# Create a 1D mesh
mesh <- fmesher::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)
}
# }