Reputation: 21
Is there any way to show the output of a program in a graphic format that contains vertices and edges ?
Program input will be a 2d matrix and the output will be a picture containing vertices and edges ?
Upvotes: 2
Views: 2195
Reputation: 9388
The simplest way to do it is to use graphviz, a toolset for visualizing graphs. The steps would be:
.dot
file from your graph data. The DOT language is quite straightforward, you should be able to do it without problems..dot
file (which usually is dot
), example for SVG output: dot -Tsvg -ofile.svg file.dot
Upvotes: 3
Reputation: 1808
You could use igraph, which is implemented in C (and also available as R and Python packages). Here's an example of the kind of picture you can produce (taken from this page):
Upvotes: 1