def example_confidence_interval(ax=None, seaborn=False, **options):
    """
    draw pseudo confidence interval for a regression in a matplotlib

    @param      ax          axis
    @param      seaborn     uses *seaborn* instead of *matplotlib*
    @param      options     look at the code
    @return                 ax
    """
    import matplotlib.pyplot as plt
    if ax is None:
        _, ax = plt.subplots(nrows=1, ncols=1, figsize=options.get(
            'figsize', (5, 5)))
    import scipy
    import numpy
    nx, nboot = 22, 400
    x = scipy.linspace(0.0, 1.0, nx)
    data = x + numpy.random.normal(loc=0.0, scale=0.1, size=nx)
    yp = scipy.polyfit(x, data, 1)
    y = scipy.polyval(yp, x)
    if seaborn:
        from seaborn import regplot
        return regplot(x, data, ax=ax)
    else:
        r = data - y
        for i in range(nboot):
            pc = scipy.polyfit(x, y + r[scipy.random.randint(0, nx - 1, nx)], 1
                )
            ax.plot(x, scipy.polyval(pc, x), 'k-', linewidth=2, alpha=3.0 /
                float(nboot))
        ax.plot(x, y, 'k-')
        ax.plot(x, data, 'ko')
        return ax
