class_docstr: Layout some DataFrames in vertical/horizontal layout for explanation.
  Used in merging.rst
docstr: Plot left / right DataFrames in specified layout.
  
  Parameters
  ----------
  left : list of DataFrames before operation is applied
  right : DataFrame of operation result
  labels : list of str to be drawn as titles of left DataFrames
  vertical : bool
      If True, use vertical layout. If False, use horizontal layout.
docstr_tok: ["Plot","left","\/","right","DataFrames","in","specified","layout",".","Parameters","--","--","--","--","--","left",":","list","of","DataFrames","before","operation","is","applied","right",":","DataFrame","of","operation","result","labels",":","list","of","str","to","be","drawn","as","titles","of","left","DataFrames","vertical",":","bool","If","True",",","use","vertical","layout",".","If","False",",","use","horizontal","layout","."]
code: def plot(self, left, right, labels=None, vertical=True):
      """
      Plot left / right DataFrames in specified layout.
  
      Parameters
      ----------
      left : list of DataFrames before operation is applied
      right : DataFrame of operation result
      labels : list of str to be drawn as titles of left DataFrames
      vertical : bool
          If True, use vertical layout. If False, use horizontal layout.
      """
      import matplotlib.pyplot as plt
      import matplotlib.gridspec as gridspec
  
      if not isinstance(left, list):
          left = [left]
      left = [self._conv(l) for l in left]
      right = self._conv(right)
  
      hcells, vcells = self._get_cells(left, right, vertical)
  
      if vertical:
          figsize = self.cell_width * hcells, self.cell_height * vcells
      else:
          # include margin for titles
          figsize = self.cell_width * hcells, self.cell_height * vcells
      fig = plt.figure(figsize=figsize)
  
      if vertical:
          gs = gridspec.GridSpec(len(left), hcells)
          # left
          max_left_cols = max(self._shape(l)[1] for l in left)
          max_left_rows = max(self._shape(l)[0] for l in left)
          for i, (l, label) in enumerate(zip(left, labels)):
              ax = fig.add_subplot(gs[i, 0:max_left_cols])
              self._make_table(
                  ax, l, title=label, height=1.0 / max_left_rows
              )
          # right
          ax = plt.subplot(gs[:, max_left_cols:])
          self._make_table(
              ax, right, title="Result", height=1.05 / vcells
          )
          fig.subplots_adjust(
              top=0.9, bottom=0.05, left=0.05, right=0.95
          )
      else:
          max_rows = max(self._shape(df)[0] for df in left + [right])
          height = 1.0 / np.max(max_rows)
          gs = gridspec.GridSpec(1, hcells)
          # left
          i = 0
          for l, label in zip(left, labels):
              sp = self._shape(l)
              ax = fig.add_subplot(gs[0, i : i + sp[1]])
              self._make_table(ax, l, title=label, height=height)
              i += sp[1]
          # right
          ax = plt.subplot(gs[0, i:])
          self._make_table(ax, right, title="Result", height=height)
          fig.subplots_adjust(
              top=0.85, bottom=0.05, left=0.05, right=0.95
          )
  
      return fig
  
file_path: catboost/contrib/python/pandas/py2/pandas/util/_doctools.py
imports: import numpy
  import pandas.compat
  import pandas
label_desc: Use image node_id 4 for calling the TablePlotter obj's underlying member method code with example usage: obj.plot(left, right, labels, vertical) and returns: fig