%% Cumulative Histogram with Ogive Curve
% Create a cumulative histogram by specifying 'Normalization' as 'cumcount'.

data = randn(100,1); 
histogram(data,'Normalization','cumcount')

%
% Plot an ogive curve on top of the histogram. This curve plots the cumulative number of observations (y-axis) against the data (x-axis).

hold on 
stairs(sort(data),1:numel(data))

% Copyright 2015 The MathWorks, Inc.