Updated graph visualization script