for r in [x, y, z]:
    for i in np.arange(len(r)):
        if r[i] < -5:
            x[i] = np.NaN
y[i] = np.NaN
z[i] = np.NaN
Matplotlib 3D plot - parametric curve "wraparound" from certain perspectives