added ability to write dot files for discrete graphs