Simulated spatial data representation in R
I guess you can try the code below
g <- make_ring(length(result_snip) - 1) %>%
set_vertex_attr(name = "name", value = names(result_snip)[-1])
g_layout <- layout_nicely(g)
apply(
result_snip,
1,
function(v) {
g %>%
set_vertex_attr(name = "color", value = v[-1] != 0) %>%
set_vertex_attr(name = "size", value = 10 + v[-1]) %>%
plot(main = paste0(names(v[1]),"=", v[1]), layout = g_layout)
}
)
which will generate a seris of plots and one of them looks like