Regularised regression code
You can get rid of some of the repetition using a for loop looping over the lambdas and colors and using tuple assignment to at least get rid of one level of having to use indexing as well as the necessity of having to call fitreg twice for each plot:

if __name__ == "__main__":

    D = 1
    N = 10
    mu = np.arange(10)

    xx = mu[:, None] + 0.01 * np.random.randn(N, D)
    yy = 2 * xx + 2 * np.random.randn(N, D)

    plt.clf()
    plt.plot(xx, yy, 'kx')

    x, y = fit(phi_poly, xx, yy)
    plt.plot(x, y, 'b-')
    for lamb, color in zip([1, 10, 0.1], "rgy"):
        x, y = fitreg(phi_poly, xx, yy, lamb)
        plt.plot(x, y[:, 0], '{}-'.format(color))

    plt.show()


I also added a if __name__ == "__main__": guard to allow importing from this script in another script and used numpy.arange for your mu array.

For the construction of xx you don't actually need the numpy.tile, the normal broadcasting rules already do that for you.