class_docstr: Specialized PolyCollection for barbs.
  
  The only API method is :meth:`set_UVC`, which can be used to
  change the size, orientation, and color of the arrows.  Locations
  are changed using the :meth:`set_offsets` collection method.
  Possibly this method will be useful in animations.
  
  There is one internal function :meth:`_find_tails` which finds
  exactly what should be put on the barb given the vector magnitude.
  From there :meth:`_make_barbs` is used to find the vertices of the
  polygon to represent the barb based on this information.
class_docstr_tok: ["Specialized","PolyCollection","for","barbs",".","The","only","API","method","is",":","meth",":","`","set_UVC","`",",","which","can","be","used","to","change","the","size",",","orientation",",","and","color","of","the","arrows",".","Locations","are","changed","using","the",":","meth",":","`","set_offsets","`","collection","method",".","Possibly","this","method","will","be","useful","in","animations",".","There","is","one","internal","function",":","meth",":","`","_find_tails","`","which","finds","exactly","what","should","be","put","on","the","barb","given","the","vector","magnitude",".","From","there",":","meth",":","`","_make_barbs","`","is","used","to","find","the","vertices","of","the","polygon","to","represent","the","barb","based","on","this","information","."]
docstr: Find how many of each of the tail pieces is necessary.  Flag
  specifies the increment for a flag, barb for a full barb, and half for
  half a barb. Mag should be the magnitude of a vector (i.e., >= 0).
  
  This returns a tuple of:
  
      (*number of flags*, *number of barbs*, *half_flag*, *empty_flag*)
  
  *half_flag* is a boolean whether half of a barb is needed,
  since there should only ever be one half on a given
  barb. *empty_flag* flag is an array of flags to easily tell if
  a barb is empty (too low to plot any barbs/flags.
docstr_tok: ["Find","how","many","of","each","of","the","tail","pieces","is","necessary",".","Flag","specifies","the","increment","for","a","flag",",","barb","for","a","full","barb",",","and","half","for","half","a","barb",".","Mag","should","be","the","magnitude","of","a","vector","(","i.e.",",",">","=","0",")",".","This","returns","a","tuple","of",":","(","*","number","of","flags","*",",","*","number","of","barbs","*",",","*","half_flag","*",",","*","empty_flag","*",")","*","half_flag","*","is","a","boolean","whether","half","of","a","barb","is","needed",",","since","there","should","only","ever","be","one","half","on","a","given","barb",".","*","empty_flag","*","flag","is","an","array","of","flags","to","easily","tell","if","a","barb","is","empty","(","too","low","to","plot","any","barbs\/flags","."]
code: def _find_tails(self, mag, rounding=True, half=5, full=10, flag=50):
      """
      Find how many of each of the tail pieces is necessary.  Flag
      specifies the increment for a flag, barb for a full barb, and half for
      half a barb. Mag should be the magnitude of a vector (i.e., >= 0).
  
      This returns a tuple of:
  
          (*number of flags*, *number of barbs*, *half_flag*, *empty_flag*)
  
      *half_flag* is a boolean whether half of a barb is needed,
      since there should only ever be one half on a given
      barb. *empty_flag* flag is an array of flags to easily tell if
      a barb is empty (too low to plot any barbs/flags.
      """
  
      # If rounding, round to the nearest multiple of half, the smallest
      # increment
      if rounding:
          mag = half * (mag / half + 0.5).astype(int)
  
      num_flags = np.floor(mag / flag).astype(int)
      mag = np.mod(mag, flag)
  
      num_barb = np.floor(mag / full).astype(int)
      mag = np.mod(mag, full)
  
      half_flag = mag >= half
      empty_flag = ~(half_flag | (num_flags > 0) | (num_barb > 0))
  
      return num_flags, num_barb, half_flag, empty_flag
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import math
  import weakref
  import numpy
  from numpy import ma
  import matplotlib.collections
  import matplotlib.transforms
  import matplotlib.text
  import matplotlib.artist
  from matplotlib.artist import allow_rasterization
  from matplotlib import docstring
  import matplotlib.font_manager
  from matplotlib.cbook import delete_masked_points
  from matplotlib.patches import CirclePolygon
label_desc: Use image node_id 2 for calling the Barbs obj's underlying member method code with example usage: obj._find_tails(mag, rounding, half, full, flag) and returns: num_flags,  num_barb,  half_flag,  empty_flag