Build graph definition in DOT format