nodes: 0, module; 1, function_definition; 2, function_name:plot_teq; 3, parameters; 4, block; 5, identifier:fignum; 6, identifier:araiblock; 7, identifier:s; 8, identifier:pars; 9, expression_statement; 10, expression_statement; 11, comment:# make the stereonet; 12, expression_statement; 13, expression_statement; 14, expression_statement; 15, for_statement; 16, expression_statement; 17, if_statement; 18, for_statement; 19, if_statement; 20, if_statement; 21, comment:#; 22, comment:#   put on the directions; 23, comment:#; 24, expression_statement; 25, if_statement; 26, expression_statement; 27, if_statement; 28, expression_statement; 29, if_statement; 30, expression_statement; 31, expression_statement; 32, comment:"""
      plots directions  of pTRM steps and zero field steps
  
      Parameters
      __________
      fignum : figure number for matplotlib object
      araiblock : nested list of data from pmag.sortarai()
      s : specimen name
      pars : default is "",
          otherwise is dictionary with keys:
          'measurement_step_min' and 'measurement_step_max'
  
      Effects
      _______
      makes the equal area projection with color coded symbols
          red circles: ZI steps
          blue squares: IZ steps
          yellow : pTRM steps
  
  
      """; 33, assignment; 34, call; 35, call; 36, assignment; 37, identifier:zrec; 38, identifier:first_Z; 39, comment:# sort out the zerofield steps; 40, block; 41, call; 42, comparison_operator:pars != ""; 43, block; 44, else_clause; 45, identifier:irec; 46, identifier:first_I; 47, block; 48, boolean_operator; 49, block; 50, not_operator; 51, block; 52, assignment; 53, comparison_operator:len(ZIblock) > 0; 54, block; 55, assignment; 56, comparison_operator:len(IZblock) > 0; 57, block; 58, assignment; 59, comparison_operator:len(pTblock) > 0; 60, block; 61, call; 62, call; 63, pattern_list; 64, expression_list; 65, attribute; 66, argument_list; 67, attribute; 68, argument_list; 69, pattern_list; 70, expression_list; 71, if_statement; 72, identifier:plot_net; 73, argument_list; 74, identifier:pars; 75, string:""; 76, expression_statement; 77, block; 78, if_statement; 79, boolean_operator; 80, comparison_operator:len(pTblock) < 1; 81, return_statement; 82, identifier:isServer; 83, expression_statement; 84, identifier:sym; 85, dictionary; 86, call; 87, integer:0; 88, expression_statement; 89, comment:# plot ZI directions; 90, identifier:sym; 91, dictionary; 92, call; 93, integer:0; 94, expression_statement; 95, comment:# plot IZ directions; 96, identifier:sym; 97, dictionary; 98, call; 99, integer:0; 100, expression_statement; 101, comment:# plot pTRM directions; 102, attribute; 103, argument_list; 104, attribute; 105, argument_list; 106, identifier:first_Z; 107, identifier:first_I; 108, subscript; 109, subscript; 110, identifier:plt; 111, identifier:figure; 112, keyword_argument; 113, identifier:plt; 114, identifier:clf; 115, identifier:ZIblock; 116, identifier:IZblock; 117, identifier:pTblock; 118, list; 119, list; 120, list; 121, comparison_operator:zrec[4] == 1; 122, comment:# this is a ZI step; 123, block; 124, else_clause; 125, identifier:fignum; 126, assignment; 127, expression_statement; 128, boolean_operator; 129, block; 130, comparison_operator:len(ZIblock) < 1; 131, comparison_operator:len(IZblock) < 1; 132, call; 133, integer:1; 134, call; 135, pair; 136, pair; 137, identifier:len; 138, argument_list; 139, call; 140, pair; 141, pair; 142, identifier:len; 143, argument_list; 144, call; 145, pair; 146, pair; 147, identifier:len; 148, argument_list; 149, call; 150, identifier:plt; 151, identifier:axis; 152, string:"equal"; 153, identifier:plt; 154, identifier:text; 155, unary_operator; 156, float:1.15; 157, identifier:s; 158, identifier:araiblock; 159, integer:0; 160, identifier:araiblock; 161, integer:1; 162, identifier:num; 163, identifier:fignum; 164, subscript; 165, integer:1; 166, expression_statement; 167, block; 168, pattern_list; 169, expression_list; 170, assignment; 171, boolean_operator; 172, comparison_operator:irec[0] <= max; 173, expression_statement; 174, call; 175, integer:1; 176, call; 177, integer:1; 178, identifier:len; 179, argument_list; 180, attribute; 181, argument_list; 182, string; 183, list; 184, string; 185, list; 186, identifier:ZIblock; 187, identifier:plot_di_sym; 188, argument_list; 189, string; 190, list; 191, string; 192, list; 193, identifier:IZblock; 194, identifier:plot_di_sym; 195, argument_list; 196, string; 197, list; 198, string; 199, list; 200, identifier:pTblock; 201, identifier:plot_di_sym; 202, argument_list; 203, float:1.1; 204, identifier:zrec; 205, integer:4; 206, call; 207, expression_statement; 208, identifier:min; 209, identifier:max; 210, call; 211, call; 212, pattern_list; 213, expression_list; 214, boolean_operator; 215, comparison_operator:irec[0] >= min; 216, subscript; 217, identifier:max; 218, call; 219, identifier:len; 220, argument_list; 221, identifier:len; 222, argument_list; 223, identifier:pTblock; 224, identifier:plt; 225, identifier:figtext; 226, float:.02; 227, float:.01; 228, identifier:version_num; 229, string_content:lower; 230, string; 231, string; 232, string_content:upper; 233, string; 234, string; 235, identifier:fignum; 236, identifier:ZIblock; 237, identifier:sym; 238, string_content:lower; 239, string; 240, string; 241, string_content:upper; 242, string; 243, string; 244, identifier:fignum; 245, identifier:IZblock; 246, identifier:sym; 247, string_content:lower; 248, string; 249, string; 250, string_content:upper; 251, string; 252, string; 253, identifier:fignum; 254, identifier:pTblock; 255, identifier:sym; 256, attribute; 257, argument_list; 258, call; 259, identifier:float; 260, argument_list; 261, identifier:float; 262, argument_list; 263, identifier:min; 264, identifier:max; 265, subscript; 266, subscript; 267, comparison_operator:irec[1] != 0; 268, comparison_operator:irec[1] != 0; 269, subscript; 270, identifier:min; 271, identifier:irec; 272, integer:0; 273, attribute; 274, argument_list; 275, identifier:ZIblock; 276, identifier:IZblock; 277, string_content:o; 278, string_content:r; 279, string_content:o; 280, string_content:m; 281, string_content:s; 282, string_content:b; 283, string_content:s; 284, string_content:c; 285, string_content:^; 286, string_content:g; 287, string_content:^; 288, string_content:y; 289, identifier:ZIblock; 290, identifier:append; 291, list; 292, attribute; 293, argument_list; 294, subscript; 295, subscript; 296, subscript; 297, integer:0; 298, subscript; 299, integer:0; 300, subscript; 301, integer:0; 302, subscript; 303, integer:0; 304, identifier:irec; 305, integer:0; 306, identifier:pTblock; 307, identifier:append; 308, list; 309, subscript; 310, subscript; 311, identifier:IZblock; 312, identifier:append; 313, list; 314, identifier:pars; 315, string:"measurement_step_min"; 316, identifier:pars; 317, string:"measurement_step_max"; 318, identifier:first_I; 319, integer:0; 320, identifier:first_I; 321, unary_operator; 322, identifier:irec; 323, integer:1; 324, identifier:irec; 325, integer:1; 326, subscript; 327, subscript; 328, identifier:zrec; 329, integer:1; 330, identifier:zrec; 331, integer:2; 332, subscript; 333, subscript; 334, integer:1; 335, identifier:irec; 336, integer:1; 337, identifier:irec; 338, integer:2; 339, identifier:zrec; 340, integer:1; 341, identifier:zrec; 342, integer:2
code: def plot_teq(fignum, araiblock, s, pars):
      """
      plots directions  of pTRM steps and zero field steps
  
      Parameters
      __________
      fignum : figure number for matplotlib object
      araiblock : nested list of data from pmag.sortarai()
      s : specimen name
      pars : default is "",
          otherwise is dictionary with keys:
          'measurement_step_min' and 'measurement_step_max'
  
      Effects
      _______
      makes the equal area projection with color coded symbols
          red circles: ZI steps
          blue squares: IZ steps
          yellow : pTRM steps
  
  
      """
      first_Z, first_I = araiblock[0], araiblock[1]
  # make the stereonet
      plt.figure(num=fignum)
      plt.clf()
      ZIblock, IZblock, pTblock = [], [], []
      for zrec in first_Z:  # sort out the zerofield steps
          if zrec[4] == 1:  # this is a ZI step
              ZIblock.append([zrec[1], zrec[2]])
          else:
              IZblock.append([zrec[1], zrec[2]])
      plot_net(fignum)
      if pars != "":
          min, max = float(pars["measurement_step_min"]), float(
              pars["measurement_step_max"])
      else:
          min, max = first_I[0][0], first_I[-1][0]
      for irec in first_I:
          if irec[1] != 0 and irec[1] != 0 and irec[0] >= min and irec[0] <= max:
              pTblock.append([irec[1], irec[2]])
      if len(ZIblock) < 1 and len(IZblock) < 1 and len(pTblock) < 1:
          return
      if not isServer:
          plt.figtext(.02, .01, version_num)
  #
  #   put on the directions
  #
      sym = {'lower': ['o', 'r'], 'upper': ['o', 'm']}
      if len(ZIblock) > 0:
          plot_di_sym(fignum, ZIblock, sym)  # plot ZI directions
      sym = {'lower': ['s', 'b'], 'upper': ['s', 'c']}
      if len(IZblock) > 0:
          plot_di_sym(fignum, IZblock, sym)  # plot IZ directions
      sym = {'lower': ['^', 'g'], 'upper': ['^', 'y']}
      if len(pTblock) > 0:
          plot_di_sym(fignum, pTblock, sym)  # plot pTRM directions
      plt.axis("equal")
      plt.text(-1.1, 1.15, s)