both a top and a bottom axis in pylab (e.g. w/ different units) (or left and right)

BlackShift picture BlackShift · Apr 15, 2009 · Viewed 7.2k times · Source

I'm trying to make a plot with pylab/matplotlib, and I have two different sets of units for the x axis. So what I would like the plot to have is two axis with different ticks, one on the top and one on the bottom. (E.g. one with miles and one with km or so.)

Something like the graph below (but than I would like multiple X axes, but that doesn't really matter.)

Multiple axis with JpGraph

Anyone an idea whether this is possible with pylab?

Answer

Nope picture Nope · Aug 25, 2009

This might be a little late but see if something like this would help:

http://matplotlib.sourceforge.net/examples/axes_grid/simple_axisline4.html