code: def seqlogo(letter_heights, vocab="DNA", ax=None):
      
      ax = ax or plt.gca()
  
      assert letter_heights.shape[1] == len(VOCABS[vocab])
      x_range = [1, letter_heights.shape[0]]
      pos_heights = np.copy(letter_heights)
      pos_heights[letter_heights < 0] = 0
      neg_heights = np.copy(letter_heights)
      neg_heights[letter_heights > 0] = 0
  
      for x_pos, heights in enumerate(letter_heights):
          letters_and_heights = sorted(zip(heights, list(VOCABS[vocab].keys())))
          y_pos_pos = 0.0
          y_neg_pos = 0.0
          for height, letter in letters_and_heights:
              color = VOCABS[vocab][letter]
              polygons = letter_polygons[letter]
              if height > 0:
                  add_letter_to_axis(ax, polygons, color, 0.5 + x_pos, y_pos_pos, height)
                  y_pos_pos += height
              else:
                  add_letter_to_axis(ax, polygons, color, 0.5 + x_pos, y_neg_pos, height)
                  y_neg_pos += height
  
      # if add_hline:
      #     ax.axhline(color="black", linewidth=1)
      ax.set_xlim(x_range[0] - 1, x_range[1] + 1)
      ax.grid(False)
      ax.set_xticks(list(range(*x_range)) + [x_range[-1]])
      ax.set_aspect(aspect='auto', adjustable='box')
      ax.autoscale_view()
docs: Make a logo plot
  
      # Arguments
          letter_heights: "motif length" x "vocabulary size" numpy array
      Can also contain negative values.
          vocab: str, Vocabulary name. Can be: DNA, RNA, AA, RNAStruct.
          ax: matplotlib axis