invert graph