Not necessary easier as your workaround, but you could insert a 'nan' element at the index where the sign flips, for example:
idx = np.argmax(np.diff(np.sign(y)))+1
x = np.insert(x, idx, np.nan)
y = np.insert(y, idx, np.nan)
The 'nan' causes Matplotlib to interrupt the line.