Basically I want to add e.g. 20%-step-markers in my CDF plot, which i visualized in powerpoint like this:
I started out adding vertical lines (e.g. plot.axhline(y=0.2...
)to then get the intersection but then I got stuck. Since a lot of books and papers actually have a visualization like the one I am showing, I wondered if there is a package that would do this in one line?
My code:
data = test_input #this is just a list with data
count, bins_count = np.histogram(data, bins=40)
pdf = count / sum(count)
cdf = np.cumsum(pdf)
plt.plot(bins_count[1:], cdf, label="CDF")
plt.legend()
plt.show()