But the true solution is to use GraphViz. Text "dot" language output to a file, process the file to a PNG.