How to see the graph and save it?

Hello everyone,
I’m really new in Graphviz. Can someone tell me how I can see the graph which is made in dot.exe and save it somewhere?
I saw many tutorial of graph making, but found no tutorial of using graphviz - see and save the graph and so on. Can anyone tell me where I can find the good tutorials?
Thanks a lot!

Best regards,
Narsu

[I assume you are planning on using Graphviz on Windows. While I don’t create graphs on Windows (I use Linux for that work), I’ve just tested my answer on Windows.]
There is no single right answer to your question, but maybe this will help.

  • Using a text editor (notepad, emacs, vim, …), create a dot input file. Save it with a .gv suffix. Save it in a convenient folder (directory). Maybe Documents, if that works for you.
  • Bring up a “Command” window (type cmd in the Windows search area)
  • In the “Command” window, type cd Documents (or whatever folder that contains your file)
  • Then type dot -Tpng myfile.gv >myfile.png (note that you can create other file types, not just png files)
  • Bring up the File Explorer and go to the folder where you have created your files.
  • Click on the myfile.png file to open (display) it.

Here is the .gv file I created with notepad:

digraph abc {
  a ->b->c
}

And the result:
abc

[I bet someone can streamline this answer]