class_docstr: Vertical interval represented by a crossbar
  
  {usage}
  
  Parameters
  ----------
  {common_parameters}
  width : float, default=0.5
      Box width as a fraction of the resolution of the data.
  fatten : float, default=2
      A multiplicative factor used to increase the size of the
      middle bar across the box.
docstr: Draw a rectangle with a horizontal strike in the box
  
  Parameters
  ----------
  data : Series
      Data Row
  da : DrawingArea
      Canvas
  lyr : layer
      Layer
  
  Returns
  -------
  out : DrawingArea
docstr_tok: ["Draw","a","rectangle","with","a","horizontal","strike","in","the","box","Parameters","--","--","--","--","--","data",":","Series","Data","Row","da",":","DrawingArea","Canvas","lyr",":","layer","Layer","Returns","--","--","--","-","out",":","DrawingArea"]
code: def draw_legend(
      data: pd.Series[Any], da: DrawingArea, lyr: Layer
  ) -> DrawingArea:
      """
      Draw a rectangle with a horizontal strike in the box
  
      Parameters
      ----------
      data : Series
          Data Row
      da : DrawingArea
          Canvas
      lyr : layer
          Layer
  
      Returns
      -------
      out : DrawingArea
      """
      from matplotlib.lines import Line2D
      from matplotlib.patches import Rectangle
  
      data["size"] *= SIZE_FACTOR
  
      # background
      facecolor = to_rgba(data["fill"], data["alpha"])
      if facecolor is None:
          facecolor = "none"
  
      bg = Rectangle(
          (da.width * 0.125, da.height * 0.25),
          width=da.width * 0.75,
          height=da.height * 0.5,
          linewidth=data["size"],
          facecolor=facecolor,
          edgecolor=data["color"],
          linestyle=data["linetype"],
          capstyle="projecting",
          antialiased=False,
      )
      da.add_artist(bg)
  
      strike = Line2D(
          [da.width * 0.125, da.width * 0.875],
          [da.height * 0.5, da.height * 0.5],
          linestyle=data["linetype"],
          linewidth=data["size"],
          color=data["color"],
      )
      da.add_artist(strike)
      return da
  
file_path: plotnine/plotnine/geoms/geom_crossbar.py
imports: from __future__ import annotations
  import typing
  from warnings import warn
  import numpy
  import pandas
  from .._utils import SIZE_FACTOR, copy_missing_columns, resolution, to_rgba
  from ..doctools import document
  from ..exceptions import PlotnineWarning
  from .geom import geom
  from .geom_polygon import geom_polygon
  from .geom_segment import geom_segment
label_desc: Use image node_id 3 for calling the geom_crossbar obj's underlying member method code with example usage: obj.draw_legend(data, da, lyr) and returns: da