On 2/13/07, Eric Emsellem <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would need the equivalent of twinx, but for other axis, so a "twiny"
> function. Shouldn't it be in mpl already?
>
> thanks for your help,
>

At the time noone wanted it, but it's easy enough to do.  I just added
the following to pylab svn:


def twiny(ax=None):
    """
    Make a second axes overlay ax (or the current axes if ax is None)
    sharing the yaxis.  The ticks for ax2 will be placed on the top,
    and the ax2 instance is returned.
    """
    if ax is None:
        ax=gca()


    ax2 = gcf().add_axes(ax.get_position(), sharey=ax, frameon=False)
    ax2.xaxis.tick_top()
    ax2.xaxis.set_label_position('top')
    ax.xaxis.tick_bottom()
    draw_if_interactive()
    return ax2

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to