geom_node_sf | R Documentation |
This geom is equivalent in functionality to ggplot2::geom_sf()
for POINT
geometries and allows for plotting of nodes in their geographical space in
different shapes, colours and sizes.
geom_node_sf(
mapping = NULL,
data = get_sf_nodes(),
position = "identity",
show.legend = NA,
...
)
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
position |
Position adjustment, either as a string naming the adjustment
(e.g. |
show.legend |
logical. Should this layer be included in the legends?
You can also set this to one of "polygon", "line", and "point" to override the default legend. |
... |
Other arguments passed on to |
geom_node_sf
understand the following aesthetics.
alpha
colour
shape
size
filter
Lorena Abad
Other geom_node_*:
geom_node_arc_bar()
,
geom_node_circle()
,
geom_node_point()
,
geom_node_range()
,
geom_node_text()
,
geom_node_tile()
,
geom_node_voronoi()
library(tidygraph)
if (require("sfnetworks", quietly = TRUE)) {
gr <- sfnetworks::as_sfnetwork(roxel)
ggraph(gr, 'sf') +
geom_node_sf(aes(color = centrality_betweenness()))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.