# HG changeset patch # User dbateman # Date 1196378852 0 # Node ID 2636c0846924d77ef54d90a4aa451dce676016d6 # Parent 66081694ffb887021c0bc99cfade2cf5d98a03cd [project @ 2007-11-29 23:27:32 by dbateman] diff -r 66081694ffb8 -r 2636c0846924 scripts/plot/pareto.m --- a/scripts/plot/pareto.m Thu Nov 29 23:14:08 2007 +0000 +++ b/scripts/plot/pareto.m Thu Nov 29 23:27:32 2007 +0000 @@ -79,10 +79,10 @@ [x, idx] = sort (x, "descend"); y = y (idx); cdf = cumsum (x); - maxcdf = cdf(end); - cdf = cdf ./ cdf (end); + maxcdf = max(cdf); + cdf = cdf ./ maxcdf; [dummy, idx95] = min (abs (cdf - .95)); - idx95 - idx95(1); + idx95 = idx95(1); [ax, hbar, hline] = plotyy (ax, 1 : idx95, x (1 : idx95), 1 : length(cdf), 100 .* cdf,