def demo_bottom_cbar(fig):
 grid = AxesGrid(fig, 121, nrows_ncols=(2, 2), axes_pad=0.1, share_all=True, label_mode='1', cbar_location='bottom', cbar_mode='edge', cbar_pad=0.25, cbar_size='15%', direction='column')
 (Z, extent) = get_demo_image()
 cmaps = [plt.get_cmap('autumn'), plt.get_cmap('summer')]
 for i in range(4):
  im = grid[i].imshow(Z, extent=extent, interpolation='nearest', cmap=cmaps[(i // 2)])
  if (i % 2):
   cbar = grid.cbar_axes[(i // 2)].colorbar(im)
 for cax in grid.cbar_axes:
  cax.toggle_label(True)
  cax.axis[cax.orientation].set_label('Bar')
 grid.axes_llc.set_xticks([(-2), 0, 2])
 grid.axes_llc.set_yticks([(-2), 0, 2])

def demo_bottom_cbar ( fig ) : grid = AxesGrid ( fig , 121 , nrows_ncols = ( 2 , 2 ) , axes_pad = 0.1 , share_all = True , label_mode = '1' , cbar_location = 'bottom' , cbar_mode = 'edge' , cbar_pad = 0.25 , cbar_size = '15%' , direction = 'column' ) ( Z , extent ) = get_demo_image ( ) cmaps = [ plt . get_cmap ( 'autumn' ) , plt . get_cmap ( 'summer' ) ] for i in range ( 4 ) : im = grid [ i ] . imshow ( Z , extent = extent , interpolation = 'nearest' , cmap = cmaps [ ( i // 2 ) ] ) if ( i % 2 ) : cbar = grid . cbar_axes [ ( i // 2 ) ] . colorbar ( im ) for cax in grid . cbar_axes : cax . toggle_label ( True ) cax . axis [ cax . orientation ] . set_label ( 'Bar' ) grid . axes_llc . set_xticks ( [ ( - 2 ) , 0 , 2 ] ) grid . axes_llc . set_yticks ( [ ( - 2 ) , 0 , 2 ] )
a grid of 2x2 images with a colorbar for each column .