code: def demo_locatable_axes_easy(ax):
      from mpl_toolkits.axes_grid1 import make_axes_locatable
  
      divider = make_axes_locatable(ax)
  
      ax_cb = divider.append_axes("right", size="5%", pad=0.05)
      fig = ax.get_figure()
      fig.add_axes(ax_cb)
  
      Z, extent = get_demo_image()
      im = ax.imshow(Z, extent=extent)
  
      plt.colorbar(im, cax=ax_cb)
      ax_cb.yaxis.tick_right()
      ax_cb.yaxis.set_tick_params(labelright=False)
  
file_path: matplotlib/galleries/examples/axes_grid1/demo_axes_divider.py
imports: import matplotlib.pyplot
  from matplotlib import cbook
label_desc: Use image node_id 4 for calling a global function with example usage: demo_locatable_axes_easy(ax) without return types