Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interactive Graphviz viewer with basic node/edge filtering [closed]

I looked thru Graphviz resources page , and questions 1 and 2 and still couldn't find specific answer. My usecase is browsing dependencies among software components (e.g. installable packages), and one particular trait with it is that some common nodes are targets for many edges. For example, almost every executable package depends on libc.

Based on that trait, I'd like to have viewer/library with following capabilities:

  1. Use Graphviz "dot" layout algorithm (force layout algos which are plenty in different libs don't provide good layout quality for the discussed usecase).
  2. Interactively disable/re-enable some node in a graph (libc example above).
  3. Interactively disable/re-enable all edged from a particular node (for example, libpng depends on libz, but that's obvious, and can be disabled to not clutter view).
  4. Re-root graph at some node (show subgraph with only nodes reachable from that node), and "zoom back" to complete graph.

Ideally, this would be a Javascript library, which would allow more complicated manipulation capabilities easily implemented. What's important that basic viewing behaviors as described above were available out of the box - again, I couldn't find something like that, with many solutions being either static viewers, or "freeform editors" allowing to drag nodes around, but not something with sufficiently high-level and useful behaviors.

Finally, if such solution doesn't exist, suggestions for the best framework to implement those features are welcome.

like image 924
pfalcon Avatar asked Feb 12 '13 18:02

pfalcon


People also ask

How do I view a dot file in Graphviz?

You might have to set the paths to the Graphviz binaries in Zgrviewer's preferences. File -> Open -> Open with dot -> SVG pipeline (standard) ... Pick your . dot file.

How do I open a dot file in Windows?

How to open a DOT file. You can open DOT files with Microsoft Word in Windows and macOS. The word processor is also available for Android and iOS devices, but only the iOS version supports DOT files. Other word processors can also open DOT files but they may not fully support the formatting of the original templates.

How do you use Graphviz?

Create a graph object, assemble the graph by adding nodes and edges, and retrieve its DOT source code string. Save the source code to a file and render it with the Graphviz installation of your system. Use the view option/method to directly inspect the resulting (PDF, PNG, SVG, etc.) file with its default application.


2 Answers

Gephi, https://gephi.org/, it supports many graph formats, of course, including Graphviz dot. It can filter nodes or edges and has some kind of analysis functions.

like image 178
frankli22586 Avatar answered Oct 06 '22 03:10

frankli22586


I found José Fonseca's xdot.py to be extremely cool Python and Cairo based application for viewing Graphviz files. It so well written and has so nice UI that one may wonder why it is a bit adhoc in its interaction support, not allowing for more extensibility out of the box. I'm currently hacking on it at https://github.com/pfalcon/xdot.py

Update: I committed proof of concept implementation of the features above as filtered-viewer.py . Likely to be renamed later.

like image 42
pfalcon Avatar answered Oct 06 '22 02:10

pfalcon