# Plotting cumulative Income Distribution

I need some help in creating a plot that shows the Income Distribution of an economy.

The simple idea is to show the population percentage at the x-coordinate and the income percentage at the y-coordinate.

For example: I have a list={0.2,0.3,0.1,0.3,0.1} of the income percentage of 5 households (each household = 20% of population).

Now I would like to show in a plot that 20% (or 1 household) holds 30% of the whole income. 40% (or 2 households) hold 60% of the income. 60% (or 3 households) hold 80% of the whole income and so on.

Please could someone assist and help?

• Have you seen ListPlot? – Edmund Jan 17 '18 at 18:36

list = {0.2, 0.3, 0.1, 0.3, 0.1};

ListLinePlot[Accumulate[Prepend[Reverse@Sort@list, 0]],
AspectRatio -> 1, Frame -> True, DataRange -> {0, 1}, Filling -> Axis,
FrameTicks -> {{{.3, .6, .8, .9}, Automatic}, {Range[0, 1, .2],
Automatic}},
Mesh -> {Range[0, 1, .2]},
MeshStyle -> Directive[PointSize[Large], Red],
GridLines -> {Range[0, 1, .2], {.3, .6, .8, .9}}] (*thanks: Bob Hanlon*)


To get the standard Lorenz curve:

ListLinePlot[{{0, 1}, Accumulate[Sort@Prepend[list, 0]]},
AspectRatio -> 1, Frame -> True, DataRange -> {0, 1}, Filling -> Axis]


• I believe that you want Accumulate[Prepend[Reverse@Sort@list, 0]] – Bob Hanlon Jan 17 '18 at 18:47
• yes, thank you @BobHanlon. – kglr Jan 17 '18 at 18:51
• Thanks @BobHanlon and @kglr! That is a big help! – Ni Ko Jan 18 '18 at 10:26