matplotlib.axes.Axes.twiny
-
Axes.twiny(self)
-
Create a twin Axes sharing the yaxis.
Create a new Axes 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
LinearLocator
.Returns: - 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.
Examples using matplotlib.axes.Axes.twiny
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.3.3/api/_as_gen/matplotlib.axes.Axes.twiny.html