Say I have a graph Gtest
, which has multiple disconnected components. I found that I can isolate individual components while retaining vertex coordinate specifications if I use VertexDelete
in the manner of:
VertexDelete[Gtest, ConnectedComponents[Gtest][[2]]]
Here assuming that Gtest
has only two connected components. However, this seems like a ridiculous way of proceeding. Is there a one-liner that will let me make a list of graphs Glist = {g1, g2, g3, ...}
where each $g_i$ corresponds to a particular connected graph in G
? How can I do this while respecting my original vertex coordinate assignments for G
?