sx = np.array(x2 + x3)
sy = np.array(y2 + y3)
t = np.arange(sx.size, dtype=float)
t /= t[-1]
N = np.linspace(0, 1, 2000)
SX = spline(t, sx, N, order=4)
SY = spline(t, sy, N, order=4)
plt.plot(x1, y1, 'r')
plt.plot(x2, y2, 'b')
plt.scatter(x3, y3, c='k')
plt.plot(SX, SY, 'g', alpha=0.7, lw=3)
plt.show()
Extend line to smoothly connect with another line