multiple (>2) y-axes

Here's some (incomplete) code snippets I used to place an extra x-axis below the normal one. I hope this helps. I agree that more axes can always be added at an arbitrary offset, although I did not try that.

import numpy as N
import matplotlib
import pylab as PLT
from matplotlib.font_manager import FontProperties # For setting legend font props.

     f1 = PLT.figure(1, figsize=(7.5,4.0))
     ax1 = f1.add_axes([0.2, 0.25, 0.6, 0.6]) # This is "normal" axis
     ax1.set_autoscale_on(False) # So that I can turn off autoscaling
     PLT.plot(lt, drift, '-', linewidth=3, label=legtext)

     # This axis is LT. Set the ticks manually.
     xticks = N.array([5.0, 8.0, 11.0, 14.0, 17.0, 20.0])
     ax1.set_autoscale_on(False) # So that I can turn off autoscaling

     # Now manually create the second axis (UT) slightly below
     ax2 = f1.add_axes([0.2, 0.15, 0.6, 0.6], frameon=False)
     # Apply offset to get UT scale for second axis
     ax2.set_xlim([xticks[0]+offset, xticks[len(xticks)-1]+offset])
     # Make tick lines invisible
     xtl = PLT.getp(ax2, 'xticklines')
     PLT.setp(xtl, 'visible', False)
     # Label the X ticks for first (LT) and second (UT) axes
     PLT.text(1.1, -0.1, 'LT', transform=ax1.transAxes)
     PLT.text(1.1, -0.25, 'UT', transform=ax1.transAxes)



Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory, Fax > (818) 393-5115
  California Institute of Technology, Email > Tony.Mannucci@...369...
  4800 Oak Grove Drive,
  Pasadena, CA 91109