def plot_residual_error(ax, x, y, y_hat, n_bins=50, alpha=0.7, s=2):
    """ Plots all the residuals from y and 'y_hat' across x
        INPUT:
            dataframe:
                dataframe of floats or invts
            x:
                a dataframe,list or array of ints or floats
            y
                a dataframe,list or array of ints or floats
            y_hat:
                a array of y values you predicted from x to be compared with
                the values of y
        OUTPUT:
            A plot showing the residuals across x (error)
    """
    residuals = y - y_hat
    ax.axhline(0, color='black', linestyle='--')
    ax.scatter(x, residuals, color='red', alpha=alpha, s=s)
    ax.set_ylabel('Residuals ($y - \\hat y$)')
