W3cubDocs

/Matplotlib 3.0

matplotlib.pyplot.twiny

matplotlib.pyplot.twiny(ax=None) [source]

Make a second axes that shares the y-axis. The new axis will overlay ax (or the current axes if ax is None). The ticks for ax2 will be placed on the top, and the ax2 instance is returned.

© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.0.0/api/_as_gen/matplotlib.pyplot.twiny.html