Documentation

pareto

帕累托字符t

Syntax

pareto(Y)
pareto(Y,names)
pareto(Y,X)
H = pareto(...)
[H,ax] = pareto(...)

Description

帕累托字符ts display the values in the vectorYas bars drawn in descending order. Values inYmust be nonnegative and not includeNaNs. Only the first 95% of the cumulative distribution is displayed.

pareto(Y)labels each bar with its element index inYand also plots a line displaying the cumulative sum ofY.

pareto(Y,names)labels each bar with the associated text in the matrix or cell arraynames.

pareto(Y,X)labels each bar with the associated value fromX.

pareto(ax,..)plots into the axesaxrather than the current axes,gca.

H = pareto(...)returns the primitiveLineandBarobjects created.

[H,ax] = pareto(...)additionally returns the two axes objects created.

Examples

collapse all

Create a Pareto chart of vectory.

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

paretodisplays the elements inyas bars in descending order and labels each bar with its index iny. Sinceparetodisplays only the first 95% of the cumulative distribution, some elements inyare not displayed.

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')

Tips

You cannot place datatips (use the Datacursor tool) on graphs created withpareto.

See Also

Functions

Properties

Introduced before R2006a

Was this topic helpful?