subtree of a given graph

I've got a large graph and I want to extract all the descendant nodes of a particular node into a separate graph. It's the reverse of prune.

This should be a common task but I've yet to find instructions on how to do it.

What is the best way to do this?

Use the gvpr filter:   gvpr

Use the gvpr filter:

  gvpr -ffwd -a<root> yourgraph.gv

where <root> is the name of the node whose descendents you want and fwd is the name of a file containing

  $tvroot = node($G, ARGV[0]);
  $tvtype = TV_fwd;
  $tvnext = NULL;
N [1]

The above invocation will just get you the nodes. If you want the induced edges, add the -i flag.

Recent comments