There is no need to apply it twice, this should give you the desired result:
ax2 = ax1.twinx() ax2.set_ylim(20000*km3yearToSv, 70000*km3yearToSv) ax2.set_ylabel('Sv')
A more reliable way to do this is to first extract the limits of the chart (in case you change them and they will no longer be 20000 and 70000 , or you want the chart to automatically adjust the limits:
ax2 = ax1.twinx() mn, mx = ax1.get_ylim() ax2.set_ylim(mn*km3yearToSv, mx*km3yearToSv) ax2.set_ylabel('Sv')

In general, with some other minor changes:
import numpy as np import matplotlib.pyplot as plt mean, amp = 40000, 20000 t = np.arange(50) s1 = np.sin(t)*amp + mean
source share