mdhaber / scipy

Scipy library main repository
http://scipy.org/scipylib/
BSD 3-Clause "New" or "Revised" License
1 stars 5 forks source link

ENH: stats.ecdf: alternative for plotting CI #100

Closed tupui closed 1 year ago

tupui commented 1 year ago

This is in essence my proposal for your PR.

This would allow the following to directly plot CI in one go:

import numpy as np
from scipy import stats
import matplotlib.pyplot as plt

rng = np.random.default_rng(3810954496107292580)
res = stats.ecdf(rng.normal(size=100))

# here the color only applies to the SF curve, the CI colors are fixed (implementation detail)
res.sf.plot(color='C0')

plt.show()

We could allow these too (I can give this a go if you want):

res.sf.plot(quantiles=..., confidence_level=...)
res.sf.confidence_level(quantiles=...)