class_docstr: Define arrow (actually an arrowhead)
  
  This is used to define arrow heads for
  [](`~plotnine.geoms.geom_path`).
  
  Parameters
  ----------
  angle :
      angle in degrees between the tail a
      single edge.
  length :
      of the edge in "inches"
  ends :
      At which end of the line to draw the
      arrowhead
  type :
      When it is closed, it is also filled
class_docstr_tok: ["Define","arrow","(","actually","an","arrowhead",")","This","is","used","to","define","arrow","heads","for","[","]","(","`","~plotnine.geoms.geom_path","`",")",".","Parameters","--","--","--","--","--","angle",":","angle","in","degrees","between","the","tail","a","single","edge",".","length",":","of","the","edge","in","``","inches","''","ends",":","At","which","end","of","the","line","to","draw","the","arrowhead","type",":","When","it","is","closed",",","it","is","also","filled"]
docstr: Compute paths that create the arrow heads
  
  Parameters
  ----------
  x1, y1, x2, y2 : array_like
      List of points that define the tails of the arrows.
      The arrow heads will be at x1, y1. If you need them
      at x2, y2 reverse the input.
  panel_params : panel_view
      The scale information as may be required by the
      axes. At this point, that information is about
      ranges, ticks and labels. Attributes are of interest
      to the geom are:
  
      ```python
      "panel_params.x.range"  # tuple
      "panel_params.y.range"  # tuple
      ```
  coord : coord
      Coordinate (e.g. coord_cartesian) system of the geom.
  ax : axes
      Axes on which to plot.
  
  Returns
  -------
  out : list of Path
      Paths that create arrow heads
docstr_tok: ["Compute","paths","that","create","the","arrow","heads","Parameters","--","--","--","--","--","x1",",","y1",",","x2",",","y2",":","array_like","List","of","points","that","define","the","tails","of","the","arrows",".","The","arrow","heads","will","be","at","x1",",","y1",".","If","you","need","them","at","x2",",","y2","reverse","the","input",".","panel_params",":","panel_view","The","scale","information","as","may","be","required","by","the","axes",".","At","this","point",",","that","information","is","about","ranges",",","ticks","and","labels",".","Attributes","are","of","interest","to","the","geom","are",":","``","`","python","``","panel_params.x.range","''","#","tuple","``","panel_params.y.range","''","#","tuple","``","`","coord",":","coord","Coordinate","(","e.g",".","coord_cartesian",")","system","of","the","geom",".","ax",":","axes","Axes","on","which","to","plot",".","Returns","--","--","--","-","out",":","list","of","Path","Paths","that","create","arrow","heads"]
code: def get_paths(
      self,
      x1: npt.ArrayLike,
      y1: npt.ArrayLike,
      x2: npt.ArrayLike,
      y2: npt.ArrayLike,
      panel_params: panel_view,
      coord: Coord,
      ax: Axes,
  ) -> list[Path]:
      """
      Compute paths that create the arrow heads
  
      Parameters
      ----------
      x1, y1, x2, y2 : array_like
          List of points that define the tails of the arrows.
          The arrow heads will be at x1, y1. If you need them
          at x2, y2 reverse the input.
      panel_params : panel_view
          The scale information as may be required by the
          axes. At this point, that information is about
          ranges, ticks and labels. Attributes are of interest
          to the geom are:
  
          ```python
          "panel_params.x.range"  # tuple
          "panel_params.y.range"  # tuple
          ```
      coord : coord
          Coordinate (e.g. coord_cartesian) system of the geom.
      ax : axes
          Axes on which to plot.
  
      Returns
      -------
      out : list of Path
          Paths that create arrow heads
      """
      from matplotlib.path import Path
  
      # The arrowhead path has 3 vertices,
      # plus a dummy vertex for the STOP code
      dummy = (0, 0)
  
      # codes list remains the same after initialization
      codes = [Path.MOVETO, Path.LINETO, Path.LINETO, Path.STOP]
  
      # We need the axes dimensions so that we can
      # compute scaling factors
      width, height = _axes_get_size_inches(ax)
      ranges = coord.range(panel_params)
      width_ = np.ptp(ranges.x)
      height_ = np.ptp(ranges.y)
  
      # scaling factors to prevent skewed arrowheads
      lx = self.length * width_ / width
      ly = self.length * height_ / height
  
      # angle in radians
      a = self.angle * np.pi / 180
  
      # direction of arrow head
      xdiff, ydiff = x2 - x1, y2 - y1  # type: ignore
      rotations = np.arctan2(ydiff / ly, xdiff / lx)
  
      # Arrow head vertices
      v1x = x1 + lx * np.cos(rotations + a)
      v1y = y1 + ly * np.sin(rotations + a)
      v2x = x1 + lx * np.cos(rotations - a)
      v2y = y1 + ly * np.sin(rotations - a)
  
      # create a path for each arrow head
      paths = []
      for t in zip(v1x, v1y, x1, y1, v2x, v2y):  # type: ignore
          verts = [t[:2], t[2:4], t[4:], dummy]
          paths.append(Path(verts, codes))
  
      return paths
  
imports: from __future__ import annotations
  import typing
  from collections import Counter
  from contextlib import suppress
  from warnings import warn
  import numpy
  from .._utils import SIZE_FACTOR, make_line_segments, match, to_rgba
  from ..doctools import document
  from ..exceptions import PlotnineWarning
  from .geom import geom
label_desc: Use image node_id 3 for calling the arrow obj's underlying member method code with example usage: obj.get_paths(x1, y1, x2, y2, panel_params, coord, ax) and returns: paths