When I run my code to generate a graph of the relative cumulative frequencies of a dataset, my graphs come out with a line straight down at the point the graph crosses the line y=1 on the right side, like this one.
The y-axis is limited to the range y=0 to y=1, representing 0% to 100% of the cumulative frequency, once the graph reached y=1, or 100%, it should continue at y=1 until the upper limit of the x-axis, which goes from x=0 to x=2, similar to this graph.
Is there some way to ensure that the historgram contiues at y=1 after y=1 has been reached? I need my x-axis to remain on the range [0,2] and the y-axis on the range [0,1].
Here is my Python code I use to generate my graphs:
import matplotlib.pyplot as plt
# ...
plt.ylabel('Relative Cumulative Frequency')
plt.xlabel('Normalized Eigenvalues')
plt.hist(e.real, bins = 50, normed=1, histtype='step', cumulative=True)
# Limit X and Y ranges
plt.xlim(0, 2)
plt.ylim(0, 1)
Thanks, Max
