def plot(self, left, right, labels=None, vertical=True):
import matplotlib.pyplot as plt<EOL>import matplotlib.gridspec as gridspec<EOL>if not isinstance(left, list):<EOL><INDENT>left = [left]<EOL><DEDENT>left = [self._conv(l) for l in left]<EOL>right = self._conv(right)<EOL>hcells, vcells = self._get_cells(left, right, vertical)<EOL>if vertical:<EOL><INDENT>figsize = self.cell_width * hcells, self.cell_height * vcells<EOL><DEDENT>else:<EOL><INDENT>figsize = self.cell_width * hcells, self.cell_height * vcells<EOL><DEDENT>fig = plt.figure(figsize=figsize)<EOL>if vertical:<EOL><INDENT>gs = gridspec.GridSpec(len(left), hcells)<EOL>max_left_cols = max(self._shape(l)[<NUM_LIT:1>] for l in left)<EOL>max_left_rows = max(self._shape(l)[<NUM_LIT:0>] for l in left)<EOL>for i, (l, label) in enumerate(zip(left, labels)):<EOL><INDENT>ax = fig.add_subplot(gs[i, <NUM_LIT:0>:max_left_cols])<EOL>self._make_table(ax, l, title=label,<EOL>height=<NUM_LIT:1.0> / max_left_rows)<EOL><DEDENT>ax = plt.subplot(gs[:, max_left_cols:])<EOL>self._make_table(ax, right, title='<STR_LIT>', height=<NUM_LIT> / vcells)<EOL>fig.subplots_adjust(top=<NUM_LIT>, bottom=<NUM_LIT>, left=<NUM_LIT>, right=<NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>max_rows = max(self._shape(df)[<NUM_LIT:0>] for df in left + [right])<EOL>height = <NUM_LIT:1.0> / np.max(max_rows)<EOL>gs = gridspec.GridSpec(<NUM_LIT:1>, hcells)<EOL>i = <NUM_LIT:0><EOL>for l, label in zip(left, labels):<EOL><INDENT>sp = self._shape(l)<EOL>ax = fig.add_subplot(gs[<NUM_LIT:0>, i:i + sp[<NUM_LIT:1>]])<EOL>self._make_table(ax, l, title=label, height=height)<EOL>i += sp[<NUM_LIT:1>]<EOL><DEDENT>ax = plt.subplot(gs[<NUM_LIT:0>, i:])<EOL>self._make_table(ax, right, title='<STR_LIT>', height=height)<EOL>fig.subplots_adjust(top=<NUM_LIT>, bottom=<NUM_LIT>, left=<NUM_LIT>, right=<NUM_LIT>)<EOL><DEDENT>return fig<EOL>
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.