How can I make my CDF plots start at the origin of the graph?
1 view (last 30 days)
Show older comments
I am using CDF plots of two data sets compared to one another. I'd like them to start at the same place (zero), to compare their distributions.
Here's what I'm using:
F1 = cdfplot(x);
hold on
F2 = cdfplot(y)
set(F1,'LineWidth',2,'Color','r')
set(F2,'LineWidth',2)
legend([F1 F2],'Data Set 1','Data Set 2','Location','NW')
Thanks!
0 Comments
Answers (1)
Walter Roberson
on 30 Sep 2012
The sample plot is consistent with the possibility that both start at 0, but that one of them is 0 for more entries than the other. e.g.,
0 0 0 0 0 0 x x x x
0 0 0 y y y y y y y
The first of those lines would have a count of 0 until the 7th element and so would not start to rise until then, whereas the second line would start to rise at the 4th element. But both of them start at 0.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!