Adds highlight markers to specified nodes and grays out non-highlighted nodes. Preserves all existing vertex/edge attributes and class structure.
c_net_highlight(graph, nodes = NULL, edges = NULL, gray_color = "gray80")
metanet
par(mfrow = c(1, 3))
nodes <- c("s__Kribbella_catacumbae", "s__Verrucosispora_andamanensis")
nodes <- V(c_net_ego(co_net, nodes))$name
g_hl <- c_net_highlight(co_net, nodes = nodes)
plot(g_hl) # Highlighted nodes keep colors, others turn gray
get_e(co_net) %>% head(20) -> hl_edges
g_hl2 <- c_net_highlight(co_net, edges = hl_edges[, 2:3])
c_net_plot(g_hl2)
g_hl3 <- c_net_highlight(co_net, nodes = nodes, edges = hl_edges[, 2:3])
c_net_plot(g_hl3)