Code to print graph to output so that dot can be used to generate pdf of graph.