views:

45

answers:

1

I have a very complex graph, and there is no way that I can show it all and understand it. I need to make simplified versions of it showing only some nodes and not others. I don't just want the other nodes to be invisible, but to really be absent (so that the graph is simplified).

The solution would be to make a graph with only some layers. But is that possible? What other options are there?

Thanks, Pietro

A: 

I found a possible solution. It uses gvpr which is already installed if you have graphviz (at least it was in my machine).

You can set up gvpr to read a .dot file, follow some instructions and produce another .dot file.

So I added a property "tag="TAGfoo TAGgoo TAGsoo". There are probably better ways but since I need to use regular expression, this works well enough.

Then the command:

gvpr  -i 'N[tag=="(*TAGfoo*|*TAGgoo*)"]'  filesource.dot >fileproduced.dot

will take all and only the nodes that have TAGfoo or TAGgoo.

It could be made cleaner.

Pietro Speroni