Adds sample localities of a gData to a ggplot as a ggplot2::geom_sf()
layer.
Usage
geom_gdata(
data = NULL,
mapping = ggplot2::aes(),
original = FALSE,
stat = "sf",
position = "identity",
na.rm = FALSE,
show.legend = NA,
...
)Arguments
- data
a
gDataobject.- mapping
aesthetics.
- original
logical. If TRUE, plot at the original sample locations; if FALSE (default), plot at the assigned-node coordinates on the linked gGraph.
- stat, position, na.rm, show.legend, ...
forwarded to
ggplot2::geom_sf().
See also
Other ggplot_methods:
autoplot.gData(),
autoplot.gGraph(),
geom_ggraph(),
geom_gpath()
Examples
library(ggplot2)
ggplot() +
geom_gdata(data = hgdp, color = "black", size = 1.5) +
theme_void()
