%% Display All the Values in the Cumulative Distribution
% Use a Pareto chart to examine the preferred types of pie in a survey of 200 participants. Define x as a string vector containing five pie flavors, and define y as the number of votes for each flavor. Create a Pareto chart, and include all the values in the cumulative distribution by setting the threshold argument to 1.

x = ["Chocolate" "Apple" "Pecan" "Cherry" "Pumpkin"];
y = [35 50 30 5 80];
pareto(y,x,1)
ylabel('Votes')

% Copyright 2019 The MathWorks, Inc.