On Thu, Jun 4, 2009 at 12:16 PM, Jae-Joon Lee <lee.j.joon@gmail.com> wrote:
I hope the code below gives you some idea.

def Tc(Tf): return (5./9.)*(Tf-32)

ax1 = subplot(111) # y-axis in F
ax2 = twinx() # y-axis in C

def update_ax2(ax1):
   y1, y2 = ax1.get_ylim()
   ax2.set_ylim(Tc(y1), Tc(y2))

# automatically update ylim of ax2 when ylim of ax1 changes.
ax1.callbacks.connect("ylim_changed", update_ax2)
ax1.plot([78, 79, 79, 77])

Well I know I just learned something....


Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States