added 180° modulo inversion for plot by differentiating, then integrating