docs: def plot_zed(ZED, datablock, angle, s, units):
      """
      function to make equal area plot and zijderveld plot
  
      Parameters
      _________
      ZED : dictionary with keys for plots
          eqarea : figure number for equal area projection
          zijd   : figure number for  zijderveld plot
          demag :  figure number for magnetization against demag step
          datablock : nested list of [step, dec, inc, M (Am2), quality]
          step : units assumed in SI
          M    : units assumed Am2
          quality : [g,b], good or bad measurement; if bad will be marked as such
      angle : angle for X axis in horizontal plane, if 0, x will be 0 declination
      s : specimen name
      units :  SI units ['K','T','U'] for kelvin, tesla or undefined
  
      Effects
      _______
         calls plotting functions for equal area, zijderveld and demag figures
  
      """
      for fignum in list(ZED.keys()):
          fig = plt.figure(num=ZED[fignum])
          plt.clf()
          if not isServer:
              plt.figtext(.02, .01, version_num)
      DIbad, DIgood = [], []
      for rec in datablock:
          if cb.is_null(rec[1],zero_as_null=False):
              print('-W- You are missing a declination for specimen', s, ', skipping this row')
              continue
          if cb.is_null(rec[2],zero_as_null=False):
              print('-W- You are missing an inclination for specimen', s, ', skipping this row')
              continue
          if rec[5] == 'b':
              DIbad.append((rec[1], rec[2]))
          else:
              DIgood.append((rec[1], rec[2]))
      badsym = {'lower': ['+', 'g'], 'upper': ['x', 'c']}
      if len(DIgood) > 0:
          plot_eq(ZED['eqarea'], DIgood, s)
          if len(DIbad) > 0:
              plot_di_sym(ZED['eqarea'], DIbad, badsym)
      elif len(DIbad) > 0:
          plot_eq_sym(ZED['eqarea'], DIbad, s, badsym)
      AngleX, AngleY = [], []
      XY = pmag.dimap(angle, 90.)
      AngleX.append(XY[0])
      AngleY.append(XY[1])
      XY = pmag.dimap(angle, 0.)
      AngleX.append(XY[0])
      AngleY.append(XY[1])
      plt.figure(num=ZED['eqarea'])
      # Draw a line for Zijderveld horizontal axis
      plt.plot(AngleX, AngleY, 'r-')
      if AngleX[-1] == 0:
          AngleX[-1] = 0.01
      plt.text(AngleX[-1] + (old_div(AngleX[-1], abs(AngleX[-1]))) * .1,
               AngleY[-1] + (old_div(AngleY[-1], abs(AngleY[-1]))) * .1, 'X')
      norm = 1
      #if units=="U": norm=0
      # if there are NO good points, don't try to plot
      if DIgood:
          plot_mag(ZED['demag'], datablock, s, 1, units, norm)
          plot_zij(ZED['zijd'], datablock, angle, s, norm)
      else:
          ZED.pop('demag')
          ZED.pop('zijd')
      return ZED