code: def plot_cdf(fignum, data, xlab, sym, title, **kwargs):
      
  #
      #if len(sym)==1:sym=sym+'-'
      fig = plt.figure(num=fignum)
      # sdata=np.array(data).sort()
      sdata = []
      for d in data:
          sdata.append(d)  # have to copy the data to avoid overwriting it!
      sdata.sort()
      X, Y = [], []
      color = ""
      for j in range(len(sdata)):
          Y.append(old_div(float(j), float(len(sdata))))
          X.append(sdata[j])
      if 'color' in list(kwargs.keys()):
          color = kwargs['color']
      if 'linewidth' in list(kwargs.keys()):
          lw = kwargs['linewidth']
      else:
          lw = 1
      if color != "":
          plt.plot(X, Y, color=sym, linewidth=lw)
      else:
          plt.plot(X, Y, sym, linewidth=lw)
  
      plt.xlabel(xlab)
      plt.ylabel('Cumulative Distribution')
      plt.title(title)
      return X, Y
docs: Makes a plot of the cumulative distribution function.
      Parameters
      __________
      fignum : matplotlib figure number
      data : list of data to be plotted - doesn't need to be sorted
      sym : matplotlib symbol for plotting, e.g., 'r--' for a red dashed line
      **kwargs :  optional dictionary with {'color': color, 'linewidth':linewidth}
  
      Returns
      __________
      x : sorted list of data
      y : fraction of cdf