class_docstr: Labelled arrow for use as a quiver plot scale key.
class_docstr_tok: ["Labelled","arrow","for","use","as","a","quiver","plot","scale","key","."]
docstr: Add a key to a quiver plot.
  
  The positioning of the key depends on *X*, *Y*, *coordinates*, and
  *labelpos*.  If *labelpos* is 'N' or 'S', *X*, *Y* give the position of
  the middle of the key arrow.  If *labelpos* is 'E', *X*, *Y* positions
  the head, and if *labelpos* is 'W', *X*, *Y* positions the tail; in
  either of these two cases, *X*, *Y* is somewhere in the middle of the
  arrow+label key object.
  
  Parameters
  ----------
  Q : `~matplotlib.quiver.Quiver`
      A `.Quiver` object as returned by a call to `~.Axes.quiver()`.
  X, Y : float
      The location of the key.
  U : float
      The length of the key.
  label : str
      The key label (e.g., length and units of the key).
  angle : float, default: 0
      The angle of the key arrow, in degrees anti-clockwise from the
      x-axis.
  coordinates : {'axes', 'figure', 'data', 'inches'}, default: 'axes'
      Coordinate system and units for *X*, *Y*: 'axes' and 'figure' are
      normalized coordinate systems with (0, 0) in the lower left and
      (1, 1) in the upper right; 'data' are the axes data coordinates
      (used for the locations of the vectors in the quiver plot itself);
      'inches' is position in the figure in inches, with (0, 0) at the
      lower left corner.
  color : color
      Overrides face and edge colors from *Q*.
  labelpos : {'N', 'S', 'E', 'W'}
      Position the label above, below, to the right, to the left of the
      arrow, respectively.
  labelsep : float, default: 0.1
      Distance in inches between the arrow and the label.
  labelcolor : color, default: :rc:`text.color`
      Label color.
  fontproperties : dict, optional
      A dictionary with keyword arguments accepted by the
      `~matplotlib.font_manager.FontProperties` initializer:
      *family*, *style*, *variant*, *size*, *weight*.
  **kwargs
      Any additional keyword arguments are used to override vector
      properties taken from *Q*.
docstr_tok: ["Add","a","key","to","a","quiver","plot",".","The","positioning","of","the","key","depends","on","*","X","*",",","*","Y","*",",","*","coordinates","*",",","and","*","labelpos","*",".","If","*","labelpos","*","is","'N","'","or","'S","'",",","*","X","*",",","*","Y","*","give","the","position","of","the","middle","of","the","key","arrow",".","If","*","labelpos","*","is","'","E","'",",","*","X","*",",","*","Y","*","positions","the","head",",","and","if","*","labelpos","*","is","'","W","'",",","*","X","*",",","*","Y","*","positions","the","tail",";","in","either","of","these","two","cases",",","*","X","*",",","*","Y","*","is","somewhere","in","the","middle","of","the","arrow+label","key","object",".","Parameters","--","--","--","--","--","Q",":","`","~matplotlib.quiver.Quiver","`","A","`",".Quiver","`","object","as","returned","by","a","call","to","`","~.Axes.quiver","(",")","`",".","X",",","Y",":","float","The","location","of","the","key",".","U",":","float","The","length","of","the","key",".","label",":","str","The","key","label","(","e.g.",",","length","and","units","of","the","key",")",".","angle",":","float",",","default",":","0","The","angle","of","the","key","arrow",",","in","degrees","anti-clockwise","from","the","x-axis",".","coordinates",":","{","'axes","'",",","'figure","'",",","'data","'",",","'inches","'","}",",","default",":","'axes'","Coordinate","system","and","units","for","*","X","*",",","*","Y","*",":","'axes","'","and","'figure","'","are","normalized","coordinate","systems","with","(","0",",","0",")","in","the","lower","left","and","(","1",",","1",")","in","the","upper","right",";","'data","'","are","the","axes","data","coordinates","(","used","for","the","locations","of","the","vectors","in","the","quiver","plot","itself",")",";","'inches","'","is","position","in","the","figure","in","inches",",","with","(","0",",","0",")","at","the","lower","left","corner",".","color",":","color","Overrides","face","and","edge","colors","from","*","Q","*",".","labelpos",":","{","'N","'",",","'S","'",",","'","E","'",",","'","W","'","}","Position","the","label","above",",","below",",","to","the","right",",","to","the","left","of","the","arrow",",","respectively",".","labelsep",":","float",",","default",":","0.1","Distance","in","inches","between","the","arrow","and","the","label",".","labelcolor",":","color",",","default",":",":","rc",":","`","text.color","`","Label","color",".","fontproperties",":","dict",",","optional","A","dictionary","with","keyword","arguments","accepted","by","the","`","~matplotlib.font_manager.FontProperties","`","initializer",":","*","family","*",",","*","style","*",",","*","variant","*",",","*","size","*",",","*","weight","*",".","*","*","kwargs","Any","additional","keyword","arguments","are","used","to","override","vector","properties","taken","from","*","Q","*","."]
code: def __init__(
      self,
      Q,
      X,
      Y,
      U,
      label,
      *,
      angle=0,
      coordinates="axes",
      color=None,
      labelsep=0.1,
      labelpos="N",
      labelcolor=None,
      fontproperties=None,
      **kwargs,
  ):
      """
      Add a key to a quiver plot.
  
      The positioning of the key depends on *X*, *Y*, *coordinates*, and
      *labelpos*.  If *labelpos* is 'N' or 'S', *X*, *Y* give the position of
      the middle of the key arrow.  If *labelpos* is 'E', *X*, *Y* positions
      the head, and if *labelpos* is 'W', *X*, *Y* positions the tail; in
      either of these two cases, *X*, *Y* is somewhere in the middle of the
      arrow+label key object.
  
      Parameters
      ----------
      Q : `~matplotlib.quiver.Quiver`
          A `.Quiver` object as returned by a call to `~.Axes.quiver()`.
      X, Y : float
          The location of the key.
      U : float
          The length of the key.
      label : str
          The key label (e.g., length and units of the key).
      angle : float, default: 0
          The angle of the key arrow, in degrees anti-clockwise from the
          x-axis.
      coordinates : {'axes', 'figure', 'data', 'inches'}, default: 'axes'
          Coordinate system and units for *X*, *Y*: 'axes' and 'figure' are
          normalized coordinate systems with (0, 0) in the lower left and
          (1, 1) in the upper right; 'data' are the axes data coordinates
          (used for the locations of the vectors in the quiver plot itself);
          'inches' is position in the figure in inches, with (0, 0) at the
          lower left corner.
      color : color
          Overrides face and edge colors from *Q*.
      labelpos : {'N', 'S', 'E', 'W'}
          Position the label above, below, to the right, to the left of the
          arrow, respectively.
      labelsep : float, default: 0.1
          Distance in inches between the arrow and the label.
      labelcolor : color, default: :rc:`text.color`
          Label color.
      fontproperties : dict, optional
          A dictionary with keyword arguments accepted by the
          `~matplotlib.font_manager.FontProperties` initializer:
          *family*, *style*, *variant*, *size*, *weight*.
      **kwargs
          Any additional keyword arguments are used to override vector
          properties taken from *Q*.
      """
      super().__init__()
      self.Q = Q
      self.X = X
      self.Y = Y
      self.U = U
      self.angle = angle
      self.coord = coordinates
      self.color = color
      self.label = label
      self._labelsep_inches = labelsep
  
      self.labelpos = labelpos
      self.labelcolor = labelcolor
      self.fontproperties = fontproperties or dict()
      self.kw = kwargs
      self.text = mtext.Text(
          text=label,
          horizontalalignment=self.halign[self.labelpos],
          verticalalignment=self.valign[self.labelpos],
          fontproperties=self.fontproperties,
      )
      if self.labelcolor is not None:
          self.text.set_color(self.labelcolor)
      self._dpi_at_last_init = None
      self.zorder = Q.zorder + 0.1
  
imports: import math
  import numpy
  from numpy import ma
  from matplotlib import _api, cbook, _docstring
  import matplotlib.artist
  import matplotlib.collections
  from matplotlib.patches import CirclePolygon
  import matplotlib.text
  import matplotlib.transforms
label_desc: Use image node_id 1 to create a new QuiverKey object from inherited base classes: martist with example: obj = QuiverKey(Q, X, Y, U, label)