adding some handy graph drawing code (even though NetworkX layouts aren't really the greatest)