code: def plot_conf(fignum, s, datablock, pars, new):
      
  # make the stereonet
      if new == 1:
          plot_net(fignum)
  #
  #   plot the data
  #
      DIblock = []
      for plotrec in datablock:
          DIblock.append((float(plotrec["dec"]), float(plotrec["inc"])))
      if len(DIblock) > 0:
          plot_di(fignum, DIblock)  # plot directed lines
  #
  # put on the mean direction
  #
      x, y = [], []
      XY = pmag.dimap(float(pars[0]), float(pars[1]))
      x.append(XY[0])
      y.append(XY[1])
      plt.figure(num=fignum)
      if new == 1:
          plt.scatter(x, y, marker='d', s=80, c='r')
      else:
          if float(pars[1] > 0):
              plt.scatter(x, y, marker='^', s=100, c='r')
          else:
              plt.scatter(x, y, marker='^', s=100, c='y')
      plt.title(s)
  #
  # plot the ellipse
  #
      plot_ell(fignum, pars, 'r-,', 0, 1)
docs: plots directions and confidence ellipses