title: How to keep nested axes position while using subplots_adjust
body: <p>I use the following code to add a colorbar at the top left corner of each subplot.</p>
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  from matplotlib import gridspec
  
  # Create figure
  fig = plt.figure(figsize=(5, 2))
  
  # Specify geometry of the grid for subplots
  gs0 = gridspec.GridSpec(1, 3, wspace=0.7)
  
  # Data
  a = np.arange(3*5).reshape(3,5)
  
  for ax_i in range(3):
      # Create axes
      ax = plt.subplot(gs0[ax_i])
  
      # Plot data
      plot_pcolor = plt.pcolormesh(a)
  
      # ******** Plot a nested colorbar inside the plot ********
      # Define position of the desired colorbar in axes coordinate 
      # [(lower left x, lower left y), (upper right x, upper right y)]
      ax_coord = [(0.05, 0.5), (0.2, 0.95)]
  
      # Transform the two points from axes coordinates to display coordinates
      tr1 = ax.transAxes.transform(ax_coord)
  
      # Create an inverse transversion from display to figure coordinates
      inv = fig.transFigure.inverted()
      tr2 = inv.transform(tr1)
  
      # Position in figure coordinates [left, bottom, width, height]
      datco = [tr2[0,0], tr2[0,1], tr2[1,0]-tr2[0,0], tr2[1,1]-tr2[0,1]]
  
      # Create colorbar axes
      cbar_ax = fig.add_axes(datco)
  
      # Plot colorbar
      cbar = plt.colorbar(plot_pcolor, cax=cbar_ax)
      # ********************************************************
  
  if False:
      plt.subplots_adjust(left=0.15, bottom=0.2, right=0.95, top=0.8)
  
  plt.savefig('test.png', dpi=500)
  </code></pre>
  <p>which gives the following plot:
  <a href="https://i.stack.imgur.com/CGPIY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CGPIY.png" alt="enter image description here" /></a></p>
  <p>However, if I use the <code>subplots_adjust()</code> function (by replacing <code>False</code> to <code>True</code> in the code above), the colorbars do not move properly:
  <a href="https://i.stack.imgur.com/1j6Dr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1j6Dr.png" alt="enter image description here" /></a></p>
  <p>Do you know how I can handle it?</p>