'Create a twin Axes sharing the yaxis
Create a new Axes instance with an invisible y-axis and an independent
x-axis positioned opposite to the original one (i.e. at top). The
y-axis autoscale setting will be inherited from the original Axes.
To ensure that the tick marks of both x-axes align, see
`~matplotlib.ticker.LinearLocator`
Returns
ax_twin : Axes
The newly created Axes instance
Notes
For those who are \'picking\' artists while using twiny, pick
events are only called for the artists in the top-most axes.'

def twiny(self):

    ax2 = self._make_twin_axes(sharey=self)
    ax2.xaxis.tick_top()
    ax2.xaxis.set_label_position(u'top')
    ax2.set_autoscaley_on(self.get_autoscaley_on())
    self.xaxis.tick_bottom()
    ax2.yaxis.set_visible(False)
    ax2.patch.set_visible(False)
    return ax2
