#NEWLINE# def plot_gallery( title , images , n_col = n_col , n_row = n_row ) : #NEWLINE# #INDENT# plt . figure ( figsize = ( ( 2.0 * n_col ) , ( 2.26 * n_row ) ) ) #NEWLINE# plt . suptitle ( title , size = 16 ) #NEWLINE# for ( i , comp ) in enumerate ( images ) : #NEWLINE# #INDENT# plt . subplot ( comp , n_col , ( i + 1 ) ) #NEWLINE# vmax = max ( comp . max ( ) , ( - comp . min ( ) ) ) #NEWLINE# plt . imshow ( comp . reshape ( image_shape ) , cmap = plt . cm . gray , interpolation = 'nearest' , vmin = ( - vmax ) , vmax = vmax ) #NEWLINE# plt . xticks ( ( ) ) #NEWLINE# plt . yticks ( ( ) ) #NEWLINE# #UNINDENT# plt . subplots_adjust ( 0.01 , 0.05 , 0.99 , 0.93 , 0.04 , 0.0 )