class_docstr: An axis spine -- the line noting the data area boundaries.
  
  Spines are the lines connecting the axis tick marks and noting the
  boundaries of the data area. They can be placed at arbitrary
  positions. See `~.Spine.set_position` for more information.
  
  The default position is ``('outward', 0)``.
  
  Spines are subclasses of `.Patch`, and inherit much of their behavior.
  
  Spines draw a line, a circle, or an arc depending on if
  `~.Spine.set_patch_line`, `~.Spine.set_patch_circle`, or
  `~.Spine.set_patch_arc` has been called. Line-like is the default.
  
  For examples see :ref:`spines_examples`.
class_docstr_tok: ["An","axis","spine","--","the","line","noting","the","data","area","boundaries",".","Spines","are","the","lines","connecting","the","axis","tick","marks","and","noting","the","boundaries","of","the","data","area",".","They","can","be","placed","at","arbitrary","positions",".","See","`","~.Spine.set_position","`","for","more","information",".","The","default","position","is","``","(","'outward","'",",","0",")","``",".","Spines","are","subclasses","of","`",".Patch","`",",","and","inherit","much","of","their","behavior",".","Spines","draw","a","line",",","a","circle",",","or","an","arc","depending","on","if","`","~.Spine.set_patch_line","`",",","`","~.Spine.set_patch_circle","`",",","or","`","~.Spine.set_patch_arc","`","has","been","called",".","Line-like","is","the","default",".","For","examples","see",":","ref",":","`","spines_examples","`","."]
docstr: Return the window extent of the spines in display space, including
  padding for ticks (but not their labels)
  
  See Also
  --------
  matplotlib.axes.Axes.get_tightbbox
  matplotlib.axes.Axes.get_window_extent
docstr_tok: ["Return","the","window","extent","of","the","spines","in","display","space",",","including","padding","for","ticks","(","but","not","their","labels",")","See","Also","--","--","--","--","matplotlib.axes.Axes.get_tightbbox","matplotlib.axes.Axes.get_window_extent"]
code: def get_window_extent(self, renderer=None):
      """
      Return the window extent of the spines in display space, including
      padding for ticks (but not their labels)
  
      See Also
      --------
      matplotlib.axes.Axes.get_tightbbox
      matplotlib.axes.Axes.get_window_extent
      """
      # make sure the location is updated so that transforms etc are correct:
      self._adjust_location()
      bb = super().get_window_extent(renderer=renderer)
      if self.axis is None or not self.axis.get_visible():
          return bb
      bboxes = [bb]
      drawn_ticks = self.axis._update_ticks()
  
      major_tick = next(
          iter({*drawn_ticks} & {*self.axis.majorTicks}), None
      )
      minor_tick = next(
          iter({*drawn_ticks} & {*self.axis.minorTicks}), None
      )
      for tick in [major_tick, minor_tick]:
          if tick is None:
              continue
          bb0 = bb.frozen()
          tickl = tick._size
          tickdir = tick._tickdir
          if tickdir == "out":
              padout = 1
              padin = 0
          elif tickdir == "in":
              padout = 0
              padin = 1
          else:
              padout = 0.5
              padin = 0.5
          padout = padout * tickl / 72 * self.figure.dpi
          padin = padin * tickl / 72 * self.figure.dpi
  
          if tick.tick1line.get_visible():
              if self.spine_type == "left":
                  bb0.x0 = bb0.x0 - padout
                  bb0.x1 = bb0.x1 + padin
              elif self.spine_type == "bottom":
                  bb0.y0 = bb0.y0 - padout
                  bb0.y1 = bb0.y1 + padin
  
          if tick.tick2line.get_visible():
              if self.spine_type == "right":
                  bb0.x1 = bb0.x1 + padout
                  bb0.x0 = bb0.x0 - padin
              elif self.spine_type == "top":
                  bb0.y1 = bb0.y1 + padout
                  bb0.y0 = bb0.y0 - padout
          bboxes.append(bb0)
  
      return mtransforms.Bbox.union(bboxes)
  
imports: from collections.abc import MutableMapping
  import functools
  import numpy
  import matplotlib
  from matplotlib import _api, _docstring
  from matplotlib.artist import allow_rasterization
  import matplotlib.transforms
  import matplotlib.patches
  import matplotlib.path
label_desc: Use image node_id 8 for calling the Spine obj's underlying member method code with example usage: obj.get_window_extent(renderer) and returns: mtransforms, bb