matplotlib.pyplot.twinx#

matplotlib.pyplot.twinx(ax=None)[source]#

Make and return a second Axes that shares thex-axis. The new Axes willoverlayax (or the current Axes ifax isNone), and its ticks will beon the right.

Examples

Plots with different scales

Examples usingmatplotlib.pyplot.twinx#

Plots with different scales

Plots with different scales