On Thu, Jun 4, 2009 at 12:16 PM, Jae-Joon Lee <lee.j.j...@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

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to