class_docstr: Rectangles
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
class_docstr_tok: ["Rectangles","{","usage","}","Parameters","--","--","--","--","--","{","common_parameters","}"]
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
  
      limits = zip(
          data["xmin"], data["xmax"], data["ymin"], data["ymax"]
      )
  
      verts = [
          [(l, b), (l, t), (r, t), (r, b)] for (l, r, b, t) in limits
      ]
  
      fill = to_rgba(data["fill"], data["alpha"])
      color = data["color"]
  
      # prevent unnecessary borders
      if all(color.isna()):
          color = "none"
  
      col = PolyCollection(
          verts,
          facecolors=fill,
          edgecolors=color,
          linestyles=data["linetype"],
          linewidths=data["size"],
          zorder=params["zorder"],
          rasterized=params["raster"],
      )
      ax.add_collection(col)
  
file_path: plotnine/plotnine/geoms/geom_rect.py
imports: from __future__ import annotations
  import typing
  import numpy
  import pandas
  from .._utils import SIZE_FACTOR, to_rgba
  from ..doctools import document
  from .geom import geom
  from .geom_polygon import geom_polygon
label_desc: Use image node_id 2 for calling the geom_rect obj's underlying member method code with example usage: obj.draw_group(data, panel_params, coord, ax) without return types