Jae-Joon Lee wrote: > ... > 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]) > ...
Thanks, this was also useful for me. I see that you are discussing shortcomings of twinx -- so perhaps the following is one of those... I was using this exact script with an additional ax1.set_yscale('log') ax2.set_yscale('log') and the ticks seem to be messed up. I used 'ipython -pylab' with matplotlib.__version__ '0.98.3'. Is there something I can do to get the ticks only at the places i would like them to be? Thanks, Sebastian.
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ 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