class_docstr: A table of cells.
  
  The table consists of a grid of cells, which are indexed by (row, column).
  
  For a simple table, you'll have a full grid of cells with indices from
  (0, 0) to (num_rows-1, num_cols-1), in which the cell (0, 0) is positioned
  at the top left. However, you can also add cells with negative indices.
  You don't have to add a cell to every grid position, so you can create
  tables that have holes.
  
  *Note*: You'll usually not create an empty table from scratch. Instead use
  `~matplotlib.table.table` to create a table from data.
class_docstr_tok: ["A","table","of","cells",".","The","table","consists","of","a","grid","of","cells",",","which","are","indexed","by","(","row",",","column",")",".","For","a","simple","table",",","you","'ll","have","a","full","grid","of","cells","with","indices","from","(","0",",","0",")","to","(","num_rows-1",",","num_cols-1",")",",","in","which","the","cell","(","0",",","0",")","is","positioned","at","the","top","left",".","However",",","you","can","also","add","cells","with","negative","indices",".","You","do","n't","have","to","add","a","cell","to","every","grid","position",",","so","you","can","create","tables","that","have","holes",".","*","Note","*",":","You","'ll","usually","not","create","an","empty","table","from","scratch",".","Instead","use","`","~matplotlib.table.table","`","to","create","a","table","from","data","."]
code: def _update_positions(self, renderer):
      # called from renderer to allow more precise estimates of
      # widths and heights with get_window_extent
  
      # Do any auto width setting
      for col in self._autoColumns:
          self._auto_set_column_width(col, renderer)
  
      if self._autoFontsize:
          self._auto_set_font_size(renderer)
  
      # Align all the cells
      self._do_cell_alignment()
  
      bbox = self._get_grid_bbox(renderer)
      l, b, w, h = bbox.bounds
  
      if self._bbox is not None:
          # Position according to bbox
          if isinstance(self._bbox, Bbox):
              rl, rb, rw, rh = self._bbox.bounds
          else:
              rl, rb, rw, rh = self._bbox
          self.scale(rw / w, rh / h)
          ox = rl - l
          oy = rb - b
          self._do_cell_alignment()
      else:
          # Position using loc
          (
              BEST,
              UR,
              UL,
              LL,
              LR,
              CL,
              CR,
              LC,
              UC,
              C,
              TR,
              TL,
              BL,
              BR,
              R,
              L,
              T,
              B,
          ) = range(len(self.codes))
          # defaults for center
          ox = (0.5 - w / 2) - l
          oy = (0.5 - h / 2) - b
          if self._loc in (UL, LL, CL):  # left
              ox = self.AXESPAD - l
          if self._loc in (BEST, UR, LR, R, CR):  # right
              ox = 1 - (l + w + self.AXESPAD)
          if self._loc in (BEST, UR, UL, UC):  # upper
              oy = 1 - (b + h + self.AXESPAD)
          if self._loc in (LL, LR, LC):  # lower
              oy = self.AXESPAD - b
          if self._loc in (LC, UC, C):  # center x
              ox = (0.5 - w / 2) - l
          if self._loc in (CL, CR, C):  # center y
              oy = (0.5 - h / 2) - b
  
          if self._loc in (TL, BL, L):  # out left
              ox = -(l + w)
          if self._loc in (TR, BR, R):  # out right
              ox = 1.0 - l
          if self._loc in (TR, TL, T):  # out top
              oy = 1.0 - b
          if self._loc in (BL, BR, B):  # out bottom
              oy = -(b + h)
  
      self._offset(ox, oy)
  
imports: import numpy
  from .None import _api, _docstring
  from .artist import Artist, allow_rasterization
  from .patches import Rectangle
  from .text import Text
  from .transforms import Bbox
  from .path import Path
label_desc: Use image node_id 21 for calling the Table obj's underlying member method code with example usage: obj._update_positions(renderer) without return types