lib/mpl_toolkits/axes_grid/parasite_axes.py
def twiny(self):
        """
        call signature::

          ax2 = ax.twiny()

        create a twin of Axes for generating a plot with a shared
        y-axis but independent x axis.  The x-axis of self will have
        ticks on bottom and the returned axes will have ticks on the
        top
        """

        ax2 = ParasiteAxes(self, sharey=self, frameon=False)
        self.parasites.append(ax2)

        # for normal axes
        self.xaxis.tick_bottom()
        ax2.yaxis.set_visible(False)
        ax2.xaxis.tick_top()
        ax2.xaxis.set_label_position('top')

        # for axisline axes
        self._axislines["top"].set_visible(False)
        ax2._axislines["bottom"].set_visible(False)
        ax2._axislines["top"].set_visible(True)
        ax2._axislines["top"].major_ticklabels.set_visible(True)
        ax2._axislines["top"].label.set_visible(True)

        return ax2

        call signature::

          ax2 = ax.twiny()

        create a twin of Axes for generating a plot with a shared
        y-axis but independent x axis.  The x-axis of self will have
        ticks on bottom and the returned axes will have ticks on the
        top
        
call signature::
ax2 = ax.twiny()

create a twin of Axes for generating a plot with a shared
y-axis but independent x axis.  The x-axis of self will have
ticks on bottom and the returned axes will have ticks on the
top
call signature :: ax2 = ax . twiny () create a twin of Axes for generating a plot with a shared y - axis but independent x axis . The x - axis of self will have ticks on bottom and the returned axes will have ticks on the top
def twiny(self):
        ax2 = ParasiteAxes(self, sharey=self, frameon=False)
        self.parasites.append(ax2)
        self.xaxis.tick_bottom()
        ax2.yaxis.set_visible(False)
        ax2.xaxis.tick_top()
        ax2.xaxis.set_label_position('top')
        self._axislines["top"].set_visible(False)
        ax2._axislines["bottom"].set_visible(False)
        ax2._axislines["top"].set_visible(True)
        ax2._axislines["top"].major_ticklabels.set_visible(True)
        ax2._axislines["top"].label.set_visible(True)
        return ax2
def twiny ( self ) : ax2 = ParasiteAxes ( self , sharey = self , frameon = False ) self . parasites . append ( ax2 ) self . xaxis . tick_bottom ( ) ax2 . yaxis . set_visible ( False ) ax2 . xaxis . tick_top ( ) ax2 . xaxis . set_label_position ( 'top' ) self . _axislines [ "top" ] . set_visible ( False ) ax2 . _axislines [ "bottom" ] . set_visible ( False ) ax2 . _axislines [ "top" ] . set_visible ( True ) ax2 . _axislines [ "top" ] . major_ticklabels . set_visible ( True ) ax2 . _axislines [ "top" ] . label . set_visible ( True ) return ax2
call signature::
ax2 = ax.twiny()
call signature :: ax2 = ax . twiny ()
"""
        call signature::

          ax2 = ax.twiny()

        create a twin of Axes for generating a plot with a shared
        y-axis but independent x axis.  The x-axis of self will have
        ticks on bottom and the returned axes will have ticks on the
        top
        """ # for normal axes # for axisline axes
self