code: def make_qq_plot(kev, obs, mdl, unit, key_text):
      import omega as om
      kev = np.asarray(kev)
      obs = np.asarray(obs)
      mdl = np.asarray(mdl)
      c_obs = np.cumsum(obs)
      c_mdl = np.cumsum(mdl)
      mx = max(c_obs[-1], c_mdl[-1])
      p = om.RectPlot()
      p.addXY([0, mx], [0, mx], '1:1')
      p.addXY(c_mdl, c_obs, key_text)
      locs = np.array([0, 0.05, 0.08, 0.11, 0.17, 0.3, 0.4, 0.7, 1]) * (kev.size - 2)
      c0 = mx * 1.05
      c1 = mx * 1.1
      for loc in locs:
          i0 = int(np.floor(loc))
          frac = loc - i0
          kevval = (1 - frac) * kev[i0] + frac * kev[i0+1]
          mdlval = (1 - frac) * c_mdl[i0] + frac * c_mdl[i0+1]
          obsval = (1 - frac) * c_obs[i0] + frac * c_obs[i0+1]
          p.addXY([mdlval, mdlval], [c0, c1], '%.2f keV' % kevval, dsn=2)
          p.addXY([c0, c1], [obsval, obsval], None, dsn=2)
      p.setLabels('Cumulative model ' + unit, 'Cumulative data ' + unit)
      p.defaultKeyOverlay.vAlign = 0.3
      return p