class_docstr: A TablePlot can plot both TableViews and ViewMaps which display
  as either a single static table or as an animated table
  respectively.
class_docstr_tok: ["A","TablePlot","can","plot","both","TableViews","and","ViewMaps","which","display","as","either","a","single","static","table","or","as","an","animated","table","respectively","."]
code: def _render_table(self, element, axes):
      if self.dynamic:
          cell_widths = defaultdict(int)
          self._update_cell_widths(element, cell_widths)
      else:
          cell_widths = self.cell_widths
  
      size_factor = 1.0 - 2 * self.border
      table = mpl_Table(
          axes,
          bbox=[self.border, self.border, size_factor, size_factor],
      )
      total_width = sum(cell_widths.values())
      height = size_factor / element.rows
  
      summarize = element.rows > self.max_rows
      half_rows = self.max_rows / 2
      rows = min([self.max_rows, element.rows])
      for row in range(rows):
          adjusted_row = row
          for col in range(element.cols):
              if summarize and row > half_rows:
                  adjusted_row = element.rows - self.max_rows + row
              cell_value = self._cell_value(element, row, col)
              cellfont = self.font_types.get(
                  element.cell_type(adjusted_row, col), None
              )
              width = cell_widths[col] / float(total_width)
              font_kwargs = (
                  dict(fontproperties=cellfont) if cellfont else {}
              )
              table.add_cell(
                  row,
                  col,
                  width,
                  height,
                  text=cell_value,
                  loc="center",
                  **font_kwargs,
              )
      table.set_fontsize(self.max_font_size)
      table.auto_set_font_size(True)
      return table
  
file_path: holoviews/holoviews/plotting/mpl/tabular.py
imports: from collections import defaultdict
  import param
  from matplotlib.font_manager import FontProperties
  from matplotlib.table import Table
  from .element import ElementPlot
  from .plot import mpl_rc_context
label_desc: Use image node_id 6 for calling the TablePlot obj's underlying member method code with example usage: obj._render_table(element, axes) and returns: table