pythonpydot

Display graph without saving using pydot


I am trying to display a simple graph using pydot.

My question is that is there any way to display the graph without writing it to a file as currently I use write function to first draw and then have to use the Image module to show the files.

However is there any way that the graph directly gets printed on the screen without being saved ??


Also as an update I would like to ask in this same question that I observe that while the image gets saved very quickly when I use the show command of the Image module it takes noticeable time for the image to be seen .... Also sometimes I get the error that the image could'nt be opened because it was either deleted or saved in unavailable location which is not correct as I am saving it at my Desktop..... Does anyone know what's happening and is there a faster way to get the image loaded.....

Thanks a lot....


Solution

  • I'm afraid pydot uses graphviz to render the graphs. I.e., it runs the executable and loads the resulting image.

    Bottom line - no, you cannot avoid creating the file.