# Pareto Plots in MATLAB®

How to make Pareto Plots plots in MATLAB® with Plotly.

## Create Pareto Chart

Create a Pareto chart of vector y.

y = [90,75,30,60,5,40,40,5];
figure
pareto(y)

fig2plotly()


plot00createpareto_chart

pareto displays the elements in y as bars in descending order and labels each bar with its index in y. Since pareto displays only the first 95% of the cumulative distribution, some elements in y are not displayed.

## Label Bars in Pareto Chart

Examine the cumulative productivity of a group of programmers to see how normal its distribution is. Label each bar with the name of the programmer.

codelines = [200 120 555 608 1024 101 57 687];
coders = {'Fred','Ginger','Norman','Max','Julia','Wally','Heidi','Pat'};

figure
pareto(codelines, coders)
title('Lines of Code by Programmer')

fig2plotly()


plot10labelbarsinpareto_chart

## Display All the Values in the Cumulative Distribution

Create a Pareto chart that examines the preferred types of pie in a survey of 200 participants. Include all the values in the cumulative distribution by setting the threshold argument to 1.

pies = {'Chocolate','Apple','Pecan','Cherry','Pumpkin'};
votes = [35 50 30 5 80];