ParetoChart - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

Statistics

 ParetoChart
 produce a Pareto chart

 Calling Sequence ParetoChart( dataset ) ParetoChart( dataset, options, plotoptions )

Parameters

 dataset - data set, DataSeries, or list of equations ; Array, Matrix, Vector, DataSeries, or DataFrame of values with 1 column of data options - (optional) equation(s) of the form option=value, where option is one of color, columngraphoptions, cumulativesumoptions, labels, or showcumulative plotoptions - options to be passed to the plots:-dualaxisplot command, or the Statistics:-ColumnGraph command

Options

 • color : list, name, string; controls the colors for the column graph and the cumulative sum chart respectively. By default, the color list is [ "Niagara Azure", "Niagara Burgundy" ].
 • columngraphoptions : list; options to be passed to the Statistics:-ColumnGraph command
 • cumulativesumoptions : list; options to be passed to the Statistics:-CumulativeSumChart command
 • labels : list; labels corresponding to the labels below each of the bars in the column graph
 • showcumulative : truefalse; controls the display of a cumulative sum chart. The default is true.

Description

 • The ParetoChart command is used to generate a plot of a tagged histogram of decreasing values and a curve indicating the percentage cumulative sum of the values.
 • When the showcumulative option is set to false, any plotoptions added to the ParetoChart command are passed to Statistics:-ColumnGraph. When showcumulative is set to true (the default), any plotoptions are passed to plots:-dualaxisplot.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$
 > $\mathrm{data}≔\mathrm{DataSeries}\left(\left[327,240,176,105,43,36,33,90,61,50,166\right],\mathrm{labels}=\left["Engine 1","Engine 2","Engine 3","Wire 1","Wire 2","Wire 3","Oil","Coils","Gear Box","Steam Line","Others"\right]\right)$

The ParetoChart command generates a plot of the sorted histogram of the values in a dataset and a curve that shows the percentage cumulative sum of the values:

 > $\mathrm{ParetoChart}\left(\mathrm{data},\mathrm{size}=\left[800,400\right]\right)$
 > $\mathrm{DF}≔\mathrm{DataFrame}\left(⟨⟨220,288,136,180⟩|⟨11.94,18.1,7.68,9.61⟩|⟨543421,58500118,4594539,\mathrm{undefined}⟩|⟨\mathrm{Russia},\mathrm{China},\mathrm{USA},\mathrm{Mexico}⟩|⟨"Rubus","Vitis","Fragaria","Rubus"⟩|⟨"Crimson","Purple","Red","Indigo"⟩⟩,\mathrm{columns}=\left[\mathrm{Energy},\mathrm{Carbohydrates},\mathrm{Total Tons},\mathrm{Top Producer},\mathrm{Genus},\mathrm{Color}\right],\mathrm{rows}=\left[\mathrm{Raspberry},\mathrm{Grape},\mathrm{Strawberry},\mathrm{Blackberry}\right]\right)$
 ${\mathrm{DataFrame}}{}\left(\left[\begin{array}{cccccc}220& 11.94& 543421& \mathrm{Russia}& {"Rubus"}& {"Crimson"}\\ 288& 18.1& 58500118& \mathrm{China}& {"Vitis"}& {"Purple"}\\ 136& 7.68& 4594539& \mathrm{USA}& {"Fragaria"}& {"Red"}\\ 180& 9.61& \mathrm{undefined}& \mathrm{Mexico}& {"Rubus"}& {"Indigo"}\end{array}\right]{,}{\mathrm{rows}}{=}\left[{\mathrm{Raspberry}}{,}{\mathrm{Grape}}{,}{\mathrm{Strawberry}}{,}{\mathrm{Blackberry}}\right]{,}{\mathrm{columns}}{=}\left[{\mathrm{Energy}}{,}{\mathrm{Carbohydrates}}{,}{\mathrm{Total Tons}}{,}{\mathrm{Top Producer}}{,}{\mathrm{Genus}}{,}{\mathrm{Color}}\right]\right)$ (1)
 > $\mathrm{ParetoChart}\left({\mathrm{DF}}_{\mathrm{Carbohydrates}},\mathrm{color}=\left["LightSteelBlue","OrangeRed"\right]\right)$

The columngraphoptions and cumulativesumchart options control plot options sent to the ColumnGraph and CumulativeSumChart commands respectively:

 > $\mathrm{ParetoChart}\left({\mathrm{DF}}_{\mathrm{Energy}},\mathrm{columngraphoptions}=\left[\mathrm{color}={\mathrm{sort}\left(\mathrm{DF},\mathrm{Energy},\mathrm{>}\right)}_{\mathrm{Color}},\mathrm{labels}=\left["","Energy"\right]\right]\right)$

The ParetoChart command can also visualize results from the Tally command. In the following example, a 100-element sample is generated using the letters ["m", "a", "p", "l", "e"].

 > $\mathrm{randomize}\left(65\right):$
 > $\mathrm{randomdata}≔\mathrm{RandomTools}:-\mathrm{Generate}\left(\mathrm{list}\left(\mathrm{choose}\left(\left["m","a","p","l","e"\right]\right),100\right)\right)$
 ${\mathrm{randomdata}}{≔}\left[{"m"}{,}{"m"}{,}{"a"}{,}{"m"}{,}{"a"}{,}{"m"}{,}{"a"}{,}{"a"}{,}{"p"}{,}{"e"}{,}{"p"}{,}{"p"}{,}{"p"}{,}{"p"}{,}{"m"}{,}{"l"}{,}{"m"}{,}{"e"}{,}{"l"}{,}{"m"}{,}{"p"}{,}{"l"}{,}{"a"}{,}{"m"}{,}{"l"}{,}{"l"}{,}{"l"}{,}{"e"}{,}{"a"}{,}{"p"}{,}{"e"}{,}{"m"}{,}{"l"}{,}{"p"}{,}{"a"}{,}{"m"}{,}{"e"}{,}{"e"}{,}{"p"}{,}{"m"}{,}{"e"}{,}{"e"}{,}{"m"}{,}{"e"}{,}{"e"}{,}{"a"}{,}{"m"}{,}{"p"}{,}{"e"}{,}{"a"}{,}{"l"}{,}{"m"}{,}{"m"}{,}{"l"}{,}{"m"}{,}{"e"}{,}{"a"}{,}{"p"}{,}{"a"}{,}{"m"}{,}{"m"}{,}{"a"}{,}{"l"}{,}{"p"}{,}{"p"}{,}{"m"}{,}{"l"}{,}{"a"}{,}{"e"}{,}{"m"}{,}{"m"}{,}{"p"}{,}{"a"}{,}{"p"}{,}{"a"}{,}{"a"}{,}{"e"}{,}{"p"}{,}{"m"}{,}{"p"}{,}{"a"}{,}{"m"}{,}{"a"}{,}{"p"}{,}{"e"}{,}{"a"}{,}{"l"}{,}{"l"}{,}{"l"}{,}{"a"}{,}{"l"}{,}{"p"}{,}{"a"}{,}{"m"}{,}{"l"}{,}{"p"}{,}{"a"}{,}{"l"}{,}{"e"}{,}{"l"}\right]$ (2)
 > $\mathrm{Tally}\left(\mathrm{randomdata}\right)$
 $\left[{"m"}{=}{24}{,}{"e"}{=}{16}{,}{"p"}{=}{20}{,}{"l"}{=}{18}{,}{"a"}{=}{22}\right]$ (3)
 > $\mathrm{ParetoChart}\left(\mathrm{Tally}\left(\mathrm{randomdata}\right),\mathrm{color}=\left["Crimson","Black"\right],\mathrm{columngraphoptions}=\left[\mathrm{datasetlabels}=\mathrm{none}\right],{\mathrm{axis}}_{1}=\left[\mathrm{tickmarks}=\left[\mathrm{rotation}=0\right]\right]\right)$

Compatibility

 • The Statistics[ParetoChart] command was introduced in Maple 2018.
 • For more information on Maple 2018 changes, see Updates in Maple 2018.

 See Also