code: def get_intrusion_data(self, inv_points=None):
          r
          net = self.project.network
          if "pore.invasion_pressure" not in self.props():
              logger.error("Cannot plot drainage curve. Please run " +
                           " algorithm first")
          if inv_points is None:
              mask = ~sp.isnan(self['throat.invasion_pressure'])
              ok_Pc = self['throat.invasion_pressure'][mask]
              inv_points = np.unique(ok_Pc)
          sat_p = np.zeros(len(inv_points))
          sat_t = np.zeros(len(inv_points))
  
          for i, Pc in enumerate(inv_points):
              res = self.results(Pc=Pc)
              sat_p[i] = np.sum(res['pore.occupancy'])
              sat_t[i] = np.sum(res['throat.occupancy'])
  
          pvol = np.sum(net['pore.volume'])
          tvol = np.sum(net['throat.volume'])
          tot_vol = pvol + tvol
          tot_sat = sat_p + sat_t
          # Normalize
          sat_p /= tot_vol
          sat_t /= tot_vol
          tot_sat /= tot_vol
          pc_curve = namedtuple('pc_curve', ('Pcap', 'S_pore',
                                             'S_throat', 'S_tot'))
          data = pc_curve(inv_points, sat_p, sat_t, tot_sat)
          return data
docs: r"""
          Plot a simple drainage curve