class_docstr: Polygon, a filled path
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
  
  Notes
  -----
  All paths in the same `group` aesthetic value make up a polygon.
class_docstr_tok: ["Polygon",",","a","filled","path","{","usage","}","Parameters","--","--","--","--","--","{","common_parameters","}","Notes","--","--","-","All","paths","in","the","same","`","group","`","aesthetic","value","make","up","a","polygon","."]
code: def draw_group(
      data: pd.DataFrame,
      panel_params: panel_view,
      coord: Coord,
      ax: Axes,
      **params: Any,
  ):
      from matplotlib.collections import PolyCollection
  
      data = coord.transform(data, panel_params, munch=True)
      data["size"] *= SIZE_FACTOR
  
      # Each group is a polygon with a single facecolor
      # with potentially an edgecolor for every edge.
      verts = []
      facecolor = []
      edgecolor = []
      linestyle = []
      linewidth = []
  
      # Some stats may order the data in ways that prevent
      # objects from occluding other objects. We do not want
      # to undo that order.
      grouper = data.groupby("group", sort=False)
      for group, df in grouper:
          fill = to_rgba(df["fill"].iloc[0], df["alpha"].iloc[0])
          verts.append(tuple(zip(df["x"], df["y"])))
          facecolor.append("none" if fill is None else fill)
          edgecolor.append(df["color"].iloc[0] or "none")
          linestyle.append(df["linetype"].iloc[0])
          linewidth.append(df["size"].iloc[0])
  
      col = PolyCollection(
          verts,
          facecolors=facecolor,
          edgecolors=edgecolor,
          linestyles=linestyle,
          linewidths=linewidth,
          zorder=params["zorder"],
          rasterized=params["raster"],
      )
  
      ax.add_collection(col)
  
file_path: plotnine/plotnine/geoms/geom_polygon.py
imports: from __future__ import annotations
  import typing
  import numpy
  from .._utils import SIZE_FACTOR, to_rgba
  from ..doctools import document
  from .geom import geom
label_desc: Use image node_id 3 for calling the geom_polygon obj's underlying member method code with example usage: obj.draw_group(data, panel_params, coord, ax) without return types