def imshow_batch(images, cbar=True, show=True, pdf=None, figsize=(<NUM_LIT:16>, <NUM_LIT:12>), rows=<NUM_LIT:2>, columns=<NUM_LIT:2>, cmap=None, **kwargs):
<EOL>images = _np.array(images)<EOL>gs = _gridspec.GridSpec(rows, columns)<EOL>num_imgs = images.shape[<NUM_LIT:0>]<EOL>max_ind = num_imgs-<NUM_LIT:1><EOL>per_page = rows*columns<EOL>num_pages = _np.int(_np.ceil(num_imgs/per_page))<EOL>fig_array = _np.empty(shape=num_pages, dtype=object)<EOL>if num_pages > <NUM_LIT:1>:<EOL><INDENT>logger.info('<STR_LIT>')<EOL><DEDENT>if pdf is not None:<EOL><INDENT>f = _PdfPages(pdf)<EOL><DEDENT>for p in range(num_pages):<EOL><INDENT>fig_array[p] = _plt.figure(figsize=figsize)<EOL>pg_max_ind = _np.min( [(p+<NUM_LIT:1>) * per_page - <NUM_LIT:1>, max_ind] )<EOL>num_rows = _np.int(_np.ceil((pg_max_ind+<NUM_LIT:1> - p * per_page) / columns))<EOL>for i in range(num_rows):<EOL><INDENT>i_min_ind = p * per_page + i * columns<EOL>col_max_ind = _np.min([i_min_ind + columns - <NUM_LIT:1>, max_ind])<EOL>for j, image in enumerate(images[i_min_ind:col_max_ind+<NUM_LIT:1>]):<EOL><INDENT>ax = fig_array[p].add_subplot(gs[i, j])<EOL>try:<EOL><INDENT>if _np.issubdtype(image.dtype, _np.integer):<EOL><INDENT>image = _np.array(image, dtype=float)<EOL><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>plot = ax.imshow(image, **kwargs)<EOL>if cmap is not None:<EOL><INDENT>plot.set_cmap(cmap)<EOL><DEDENT>if cbar:<EOL><INDENT>fig_array[p].colorbar(plot)<EOL><DEDENT><DEDENT><DEDENT>fig_array[p].tight_layout()<EOL>if pdf is not None:<EOL><INDENT>f.savefig(fig_array[p])<EOL><DEDENT>if not show:<EOL><INDENT>_plt.close(fig_array[p])<EOL><DEDENT><DEDENT>if pdf is not None:<EOL><INDENT>f.close()<EOL><DEDENT>return fig_array<EOL>
Plots an array of *images* to a single window of size *figsize* with *rows* and *columns*.

* *cmap*: Specifies color map
* *cbar*: Add color bars
* *show*: If false, dismisses each window after it is created and optionally saved
* *pdf*: Save to a pdf of filename *pdf*
* *\*\*kwargs* passed to :class:`matplotlib.axis.imshow`