class_docstr: Create a table of cells.
  
  Table can have (optional) row and column headers.
  
  Each entry in the table can be either text or patches.
  
  Column widths and row heights for the table can be specified.
  
  Return value is a sequence of text, line and patch instances that make
  up the table
class_docstr_tok: ["Create","a","table","of","cells",".","Table","can","have","(","optional",")","row","and","column","headers",".","Each","entry","in","the","table","can","be","either","text","or","patches",".","Column","widths","and","row","heights","for","the","table","can","be","specified",".","Return","value","is","a","sequence","of","text",",","line","and","patch","instances","that","make","up","the","table"]
docstr: Calculate row heights and column widths.
  
  Position cells accordingly.
code: def _do_cell_alignment(self):
      """Calculate row heights and column widths.
  
      Position cells accordingly.
      """
      # Calculate row/column widths
      widths = {}
      heights = {}
      for (row, col), cell in six.iteritems(self._cells):
          height = heights.setdefault(row, 0.0)
          heights[row] = max(height, cell.get_height())
          width = widths.setdefault(col, 0.0)
          widths[col] = max(width, cell.get_width())
  
      # work out left position for each column
      xpos = 0
      lefts = {}
      for col in sorted(widths):
          lefts[col] = xpos
          xpos += widths[col]
  
      ypos = 0
      bottoms = {}
      for row in sorted(heights, reverse=True):
          bottoms[row] = ypos
          ypos += heights[row]
  
      # set cell positions
      for (row, col), cell in six.iteritems(self._cells):
          cell.set_x(lefts[col])
          cell.set_y(bottoms[row])
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from six.moves import xrange
  import warnings
  from .None import artist
  from .artist import Artist, allow_rasterization
  from .patches import Rectangle
  from matplotlib import docstring
  from .text import Text
  from .transforms import Bbox
  from matplotlib.path import Path
label_desc: Use image node_id 13 for calling the Table obj's underlying member method code with example usage: obj._do_cell_alignment() without return types