class_docstr: Specialized PolyCollection for arrows.
  
  The only API method is set_UVC(), which can be used
  to change the size, orientation, and color of the
  arrows; their locations are fixed when the class is
  instantiated.  Possibly this method will be useful
  in animations.
  
  Much of the work in this class is done in the draw()
  method so that as much information as possible is available
  about the plot.  In subsequent draw() calls, recalculation
  is limited to things that might have changed, so there
  should be no performance penalty from putting the calculations
  in the draw() method.
class_docstr_tok: ["Specialized","PolyCollection","for","arrows",".","The","only","API","method","is","set_UVC","(",")",",","which","can","be","used","to","change","the","size",",","orientation",",","and","color","of","the","arrows",";","their","locations","are","fixed","when","the","class","is","instantiated",".","Possibly","this","method","will","be","useful","in","animations",".","Much","of","the","work","in","this","class","is","done","in","the","draw","(",")","method","so","that","as","much","information","as","possible","is","available","about","the","plot",".","In","subsequent","draw","(",")","calls",",","recalculation","is","limited","to","things","that","might","have","changed",",","so","there","should","be","no","performance","penalty","from","putting","the","calculations","in","the","draw","(",")","method","."]
docstr: length is in arrow width units 
docstr_tok: ["length","is","in","arrow","width","units"]
code: def _h_arrows(self, length):
      """length is in arrow width units"""
      # It might be possible to streamline the code
      # and speed it up a bit by using complex (x,y)
      # instead of separate arrays; but any gain would be slight.
      minsh = self.minshaft * self.headlength
      N = len(length)
      length = length.reshape(N, 1)
      # This number is chosen based on when pixel values overflow in Agg
      # causing rendering errors
      # length = np.minimum(length, 2 ** 16)
      np.clip(length, 0, 2**16, out=length)
      # x, y: normal horizontal arrow
      x = np.array(
          [0, -self.headaxislength, -self.headlength, 0], np.float64
      )
      x = x + np.array([0, 1, 1, 1]) * length
      y = 0.5 * np.array([1, 1, self.headwidth, 0], np.float64)
      y = np.repeat(y[np.newaxis, :], N, axis=0)
      # x0, y0: arrow without shaft, for short vectors
      x0 = np.array(
          [
              0,
              minsh - self.headaxislength,
              minsh - self.headlength,
              minsh,
          ],
          np.float64,
      )
      y0 = 0.5 * np.array([1, 1, self.headwidth, 0], np.float64)
      ii = [0, 1, 2, 3, 2, 1, 0, 0]
      X = x.take(ii, 1)
      Y = y.take(ii, 1)
      Y[:, 3:-1] *= -1
      X0 = x0.take(ii)
      Y0 = y0.take(ii)
      Y0[3:-1] *= -1
      shrink = length / minsh if minsh != 0.0 else 0.0
      X0 = shrink * X0[np.newaxis, :]
      Y0 = shrink * Y0[np.newaxis, :]
      short = np.repeat(length < minsh, 8, axis=1)
      # Now select X0, Y0 if short, otherwise X, Y
      np.copyto(X, X0, where=short)
      np.copyto(Y, Y0, where=short)
      if self.pivot == "middle":
          X -= 0.5 * X[:, 3, np.newaxis]
      elif self.pivot == "tip":
          X = X - X[:, 3, np.newaxis]  # numpy bug? using -= does not
          # work here unless we multiply
          # by a float first, as with 'mid'.
      elif self.pivot != "tail":
          raise ValueError(
              (
                  "Quiver.pivot must have value in {{'middle', "
                  "'tip', 'tail'}} not {0}"
              ).format(self.pivot)
          )
  
      tooshort = length < self.minlength
      if tooshort.any():
          # Use a heptagonal dot:
          th = np.arange(0, 8, 1, np.float64) * (np.pi / 3.0)
          x1 = np.cos(th) * self.minlength * 0.5
          y1 = np.sin(th) * self.minlength * 0.5
          X1 = np.repeat(x1[np.newaxis, :], N, axis=0)
          Y1 = np.repeat(y1[np.newaxis, :], N, axis=0)
          tooshort = np.repeat(tooshort, 8, 1)
          np.copyto(X, X1, where=tooshort)
          np.copyto(Y, Y1, where=tooshort)
      # Mask handling is deferred to the caller, _make_verts.
      return X, Y
  
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 11 for calling the Quiver obj's underlying member method code with example usage: obj._h_arrows(length) and returns: X,  Y