How can I show only some nodes (edges) on the graph, and not others

I have a very complex graph, and I canโ€™t show it all and understand. I need to make simplified versions showing only some nodes and not others. I do not just want the other nodes to be invisible, but really absent (to simplify the schedule).

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

Thanks Pietro

+4
source share
1 answer

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

You can configure gvpr to read the .dot file, follow some instructions and create another .dot file.

So, I added the property โ€œtag =โ€ TAGfoo TAGgoo TAGsoo. โ€There are probably better ways, but since I need to use a regex, this works pretty well.

Then the command:

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

will take all and only nodes with TAGfoo or TAGgoo.

It can be made cleaner.

+4
source

Source: https://habr.com/ru/post/1307441/


All Articles