class_docstr: Connected points
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
  lineend : Literal["butt", "round", "projecting"], default="butt"
      Line end style. This option is applied for solid linetypes.
  linejoin : Literal["round", "miter", "bevel"], default="round"
      Line join style. This option is applied for solid linetypes.
  arrow : ~plotnine.geoms.geom_path.arrow, default=None
      Arrow specification. Default is no arrow.
  
  See Also
  --------
  plotnine.geoms.geom_path.arrow : for adding arrowhead(s) to paths.
class_docstr_tok: ["Connected","points","{","usage","}","Parameters","--","--","--","--","--","{","common_parameters","}","lineend",":","Literal","[","``","butt","''",",","``","round","''",",","``","projecting","''","]",",","default=","''","butt","''","Line","end","style",".","This","option","is","applied","for","solid","linetypes",".","linejoin",":","Literal","[","``","round","''",",","``","miter","''",",","``","bevel","''","]",",","default=","''","round","''","Line","join","style",".","This","option","is","applied","for","solid","linetypes",".","arrow",":","~plotnine.geoms.geom_path.arrow",",","default=None","Arrow","specification",".","Default","is","no","arrow",".","See","Also","--","--","--","--","plotnine.geoms.geom_path.arrow",":","for","adding","arrowhead","(","s",")","to","paths","."]
code: def draw_panel(
      self,
      data: pd.DataFrame,
      panel_params: panel_view,
      coord: Coord,
      ax: Axes,
      **params: Any,
  ):
      if not any(data["group"].duplicated()):
          warn(
              "geom_path: Each group consist of only one "
              "observation. Do you need to adjust the "
              "group aesthetic?",
              PlotnineWarning,
          )
  
      # drop lines with less than two points
      c = Counter(data["group"])
      counts = np.array([c[v] for v in data["group"]])
      data = data[counts >= 2]
  
      if len(data) < 2:
          return
  
      # dataframe mergesort is stable, we rely on that here
      data = data.sort_values("group", kind="mergesort")
      data.reset_index(drop=True, inplace=True)
  
      # When the parameters of the path are not constant
      # with in the group, then the lines that make the paths
      # can be drawn as separate segments
      cols = {"color", "size", "linetype", "alpha", "group"}
      cols = cols & set(data.columns)
      num_unique_rows = len(data.drop_duplicates(cols))
      ngroup = len(np.unique(data["group"].to_numpy()))
  
      constant = num_unique_rows == ngroup
      params["constant"] = constant
  
      if not constant:
          self.draw_group(data, panel_params, coord, ax, **params)
      else:
          for _, gdata in data.groupby("group"):
              gdata.reset_index(inplace=True, drop=True)
              self.draw_group(gdata, panel_params, coord, ax, **params)
  
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 2 for calling the geom_path obj's underlying member method code with example usage: obj.draw_panel(data, panel_params, coord, ax) without return types