Graphviz
Table of Contents

https://mailman.research.att.com/pipermail/graphviz-interest/2008q2/005210.html
https://mailman.research.att.com/pipermail/graphviz-interest/2008q2/005200.html

ccomps input.dot | gvpr -c -f remove.g -o output.dot

BEG_G {
  graph_t sg;
  node_t n, nxtn;
  int flag=0,count=0;
  for (sg = fstsubg($); sg; sg = nxtsubg(sg)) {
    if ((sg.name == "*_component_*") ) {
        flag = 0;
        count = 0;
        for (n = fstnode(sg); n; n = nxtn) {
            count = count + 1;
            if( (count==1) && (n.name != "*a*"))
                  flag=1;

            nxtn = nxtnode(n);
            if(flag==1) delete ($, n);
      }

    }
  }
}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License