lib/mpl_toolkits/axes_grid/parasite_axes.py
def twin(self, aux_trans=None):
        """
        call signature::

          ax2 = ax.twin()

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

        if aux_trans is None:
            ax2 = ParasiteAxesAuxTrans(self, mtransforms.IdentityTransform(),
                                       viewlim_mode="equal",
                                       )
        else:
            ax2 = ParasiteAxesAuxTrans(self, aux_trans,
                                       viewlim_mode="transform",
                                       )
        self.parasites.append(ax2)


        # for normal axes
        self.yaxis.tick_left()
        self.xaxis.tick_bottom()
        ax2.yaxis.tick_right()
        ax2.yaxis.set_label_position('right')
        ax2.xaxis.tick_top()
        ax2.xaxis.set_label_position('top')

        # for axisline axes
        self._axislines["right"].set_visible(False)
        self._axislines["top"].set_visible(False)
        ax2._axislines["left"].set_visible(False)
        ax2._axislines["bottom"].set_visible(False)

        ax2._axislines["right"].set_visible(True)
        ax2._axislines["top"].set_visible(True)
        ax2._axislines["right"].major_ticklabels.set_visible(True)
        ax2._axislines["top"].major_ticklabels.set_visible(True)

        return ax2

        call signature::

          ax2 = ax.twin()

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

create a twin of Axes for generating a plot with a sharex
x-axis but independent y axis.  The y-axis of self will have
ticks on left and the returned axes will have ticks on the
right
call signature :: ax2 = ax . twin () create a twin of Axes for generating a plot with a sharex x - axis but independent y axis . The y - axis of self will have ticks on left and the returned axes will have ticks on the right
def twin(self, aux_trans=None):
        if aux_trans is None:
            ax2 = ParasiteAxesAuxTrans(self, mtransforms.IdentityTransform(),
                                       viewlim_mode="equal",
                                       )
        else:
            ax2 = ParasiteAxesAuxTrans(self, aux_trans,
                                       viewlim_mode="transform",
                                       )
        self.parasites.append(ax2)
        self.yaxis.tick_left()
        self.xaxis.tick_bottom()
        ax2.yaxis.tick_right()
        ax2.yaxis.set_label_position('right')
        ax2.xaxis.tick_top()
        ax2.xaxis.set_label_position('top')
        self._axislines["right"].set_visible(False)
        self._axislines["top"].set_visible(False)
        ax2._axislines["left"].set_visible(False)
        ax2._axislines["bottom"].set_visible(False)
        ax2._axislines["right"].set_visible(True)
        ax2._axislines["top"].set_visible(True)
        ax2._axislines["right"].major_ticklabels.set_visible(True)
        ax2._axislines["top"].major_ticklabels.set_visible(True)
        return ax2
def twin ( self , aux_trans = None ) : if aux_trans is None : ax2 = ParasiteAxesAuxTrans ( self , mtransforms . IdentityTransform ( ) , viewlim_mode = "equal" , ) else : ax2 = ParasiteAxesAuxTrans ( self , aux_trans , viewlim_mode = "transform" , ) self . parasites . append ( ax2 ) self . yaxis . tick_left ( ) self . xaxis . tick_bottom ( ) ax2 . yaxis . tick_right ( ) ax2 . yaxis . set_label_position ( 'right' ) ax2 . xaxis . tick_top ( ) ax2 . xaxis . set_label_position ( 'top' ) self . _axislines [ "right" ] . set_visible ( False ) self . _axislines [ "top" ] . set_visible ( False ) ax2 . _axislines [ "left" ] . set_visible ( False ) ax2 . _axislines [ "bottom" ] . set_visible ( False ) ax2 . _axislines [ "right" ] . set_visible ( True ) ax2 . _axislines [ "top" ] . set_visible ( True ) ax2 . _axislines [ "right" ] . major_ticklabels . set_visible ( True ) ax2 . _axislines [ "top" ] . major_ticklabels . set_visible ( True ) return ax2
call signature::
ax2 = ax.twin()
call signature :: ax2 = ax . twin ()
"""
        call signature::

          ax2 = ax.twin()

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