I had build a tree to represent multiple connections between pages and links. And now i want to print the tree to a document.I can do it to a txt file with some sort of format but Is there any good formats to represent trees or node graphs ? And any good Java framework or library to do it?
Check out Graphviz and more specifically the dot command. This command takes a text file and renders it as a graph. So, you could write out your data as a text file in the dot format and then could later use that with the dot command to visualize it if you wanted.
A simple example of the dot format given in the PDF link above is below.
digraph G {
main -> parse -> execute;
main -> init;
main -> cleanup;
execute -> make_string;
execute -> printf
init -> make_string;
main -> printf;
execute -> compare;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With