code: def activate_subplot(numPlot):
      
      # see http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg07156.html
      from pylab import gcf, axes
      numPlot -= 1  # index is 0-based, plots are 1-based
      return axes(gcf().get_axes()[numPlot])
docs: Make subplot *numPlot* active on the canvas.
  
      Use this if a simple ``subplot(numRows, numCols, numPlot)``
      overwrites the subplot instead of activating it.