I'm currently working on a university project to implement simple graph algorithms in java (https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)) and I'm struggling to find a simple solution to export my created graphs into a image file (i.e. .png)
I already looked at tools like GraphViz and GraphStream, but they seem to focus more on visualizing their own code to create graphs.
Has anybody knowledge of a simple library or maybe even external tool which can interpret my generated output in a image file? If possible something lightweight and easy to implement.
[My code] ---> [Output] ---> [What I'm in search of] ---> [Image File]
If you generate output in the Graphviz Dot language, you can visualize it with dotty
and export to PNG or other image formats with the dot
program. The Dot language is very simple, for example here's a directed graph with 3 nodes making a cycle, and a self-edge in the third node.
digraph {
A -> B
B -> C
C -> A
C -> C
}
This is how it's rendered in dotty: