added plot function for graphs, using GraphViz