I need to highlight selected nodes in a plot, with the full graph as semi-transparent background. In plot
, I can easily ifelse
vertices that fall inside or outside my list of selected nodes, to differentiate their colors. But I haven't been able to do the same with edges. How do I index the edges that connect my selected nodes?
x <- make_ring(10)
get.edge.ids(x, c(1,2))
get.edge.ids
works only if you provide an even number vertices, not if you provide a possibly uneven arbitrary number.
This question here is similar to mine, but not the same.