function handle = cum_prct_gsd(bin_edges,data,LineSpec)
% CUM_PRCT_GSD Plot cumulative percent finer grain-size distributions.
% CUM_PRCT_GSD(bin_edges,data) plots a cumulative percent finer grain-size distribution
% curve of data, with the points specified by bin_edges. All of the grains larger than
% the final bin class are plotted in the final class.
% CUM_PRCT_GSD(...,LineSpec) plots the grain-size distribution curve where LineSpec is a
% line specification that determines line type, marker symbol, and color of the plotted
% lines. Supported values for LineSpec are identical to those for PLOT. See 'LineSpec'
% in the Matlab function reference for full details of the supported syntax.
if max(data)>max(bin_edges)
warning('WARNING: Some grains are larger than the largest defined bin')
end
if min(data)