Now generating the graphics in png files.

Using savefig() function to save networkx graphics in PNG files.