class_docstr: Draws an arc between two vectors which appears circular in display space.
class_docstr_tok: ["Draws","an","arc","between","two","vectors","which","appears","circular","in","display","space","."]
docstr: Parameters
  ----------
  xy, p1, p2 : tuple or array of two floats
      Center position and two points. Angle annotation is drawn between
      the two vectors connecting *p1* and *p2* with *xy*, respectively.
      Units are data coordinates.
  
  size : float
      Diameter of the angle annotation in units specified by *unit*.
  
  unit : str
      One of the following strings to specify the unit of *size*:
  
      * "pixels": pixels
      * "points": points, use points instead of pixels to not have a
        dependence on the DPI
      * "axes width", "axes height": relative units of Axes width, height
      * "axes min", "axes max": minimum or maximum of relative Axes
        width, height
  
  ax : `matplotlib.axes.Axes`
      The Axes to add the angle annotation to.
  
  text : str
      The text to mark the angle with.
  
  textposition : {"inside", "outside", "edge"}
      Whether to show the text in- or outside the arc. "edge" can be used
      for custom positions anchored at the arc's edge.
  
  text_kw : dict
      Dictionary of arguments passed to the Annotation.
  
  **kwargs
      Further parameters are passed to `matplotlib.patches.Arc`. Use this
      to specify, color, linewidth etc. of the arc.
docstr_tok: ["Parameters","--","--","--","--","--","xy",",","p1",",","p2",":","tuple","or","array","of","two","floats","Center","position","and","two","points",".","Angle","annotation","is","drawn","between","the","two","vectors","connecting","*","p1","*","and","*","p2","*","with","*","xy","*",",","respectively",".","Units","are","data","coordinates",".","size",":","float","Diameter","of","the","angle","annotation","in","units","specified","by","*","unit","*",".","unit",":","str","One","of","the","following","strings","to","specify","the","unit","of","*","size","*",":","*","``","pixels","''",":","pixels","*","``","points","''",":","points",",","use","points","instead","of","pixels","to","not","have","a","dependence","on","the","DPI","*","``","axes","width","''",",","``","axes","height","''",":","relative","units","of","Axes","width",",","height","*","``","axes","min","''",",","``","axes","max","''",":","minimum","or","maximum","of","relative","Axes","width",",","height","ax",":","`","matplotlib.axes.Axes","`","The","Axes","to","add","the","angle","annotation","to",".","text",":","str","The","text","to","mark","the","angle","with",".","textposition",":","{","``","inside","''",",","``","outside","''",",","``","edge","''","}","Whether","to","show","the","text","in-","or","outside","the","arc",".","``","edge","''","can","be","used","for","custom","positions","anchored","at","the","arc","'s","edge",".","text_kw",":","dict","Dictionary","of","arguments","passed","to","the","Annotation",".","*","*","kwargs","Further","parameters","are","passed","to","`","matplotlib.patches.Arc","`",".","Use","this","to","specify",",","color",",","linewidth","etc",".","of","the","arc","."]
code: def __init__(
      self,
      xy,
      p1,
      p2,
      size=75,
      unit="points",
      ax=None,
      text="",
      textposition="inside",
      text_kw=None,
      **kwargs,
  ):
      """
      Parameters
      ----------
      xy, p1, p2 : tuple or array of two floats
          Center position and two points. Angle annotation is drawn between
          the two vectors connecting *p1* and *p2* with *xy*, respectively.
          Units are data coordinates.
  
      size : float
          Diameter of the angle annotation in units specified by *unit*.
  
      unit : str
          One of the following strings to specify the unit of *size*:
  
          * "pixels": pixels
          * "points": points, use points instead of pixels to not have a
            dependence on the DPI
          * "axes width", "axes height": relative units of Axes width, height
          * "axes min", "axes max": minimum or maximum of relative Axes
            width, height
  
      ax : `matplotlib.axes.Axes`
          The Axes to add the angle annotation to.
  
      text : str
          The text to mark the angle with.
  
      textposition : {"inside", "outside", "edge"}
          Whether to show the text in- or outside the arc. "edge" can be used
          for custom positions anchored at the arc's edge.
  
      text_kw : dict
          Dictionary of arguments passed to the Annotation.
  
      **kwargs
          Further parameters are passed to `matplotlib.patches.Arc`. Use this
          to specify, color, linewidth etc. of the arc.
  
      """
      self.ax = ax or plt.gca()
      self._xydata = xy  # in data coordinates
      self.vec1 = p1
      self.vec2 = p2
      self.size = size
      self.unit = unit
      self.textposition = textposition
  
      super().__init__(
          self._xydata,
          size,
          size,
          angle=0.0,
          theta1=self.theta1,
          theta2=self.theta2,
          **kwargs,
      )
  
      self.set_transform(IdentityTransform())
      self.ax.add_patch(self)
  
      self.kw = dict(
          ha="center",
          va="center",
          xycoords=IdentityTransform(),
          xytext=(0, 0),
          textcoords="offset points",
          annotation_clip=True,
      )
      self.kw.update(text_kw or {})
      self.text = ax.annotate(text, xy=self._center, **self.kw)
  
file_path: matplotlib/galleries/examples/text_labels_and_annotations/angle_annotation.py
imports: import matplotlib.pyplot
  import numpy
  from matplotlib.patches import Arc
  from matplotlib.transforms import Bbox, IdentityTransform, TransformedBbox
label_desc: Use image node_id 1 to create a new AngleAnnotation object from inherited base classes: Arc with example: obj = AngleAnnotation(xy, p1, p2, size, unit, ax, text, textposition, text_kw)