This works nicely. Thank you JJ.
Jae-Joon Lee 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])
>
> -JJ
>
>
> On Thu, Jun 4, 2009 at 11:08 AM, musik <[email protected]> wrote:
>>
>> Exactly. I want to plot the original data once, but the two y axes show
>> different scales (units). Is twinx() good for that? How?
>>
>> Thanks.
>>
>
>
--
View this message in context:
http://www.nabble.com/one-data-set%2C-two-y-axis-scales-tp23863680p23875221.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users