Skip to content
Plotly templates

Lorenz Curve + Gini

Cumulative income share vs cumulative population — inequality measurement.

Template previewPlotly
Rendering…

Make it your own.

{
  "data": [
    { "type":"scatter","mode":"lines","name":"Observed",
      "x":[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0],
      "y":[0,0.02,0.05,0.09,0.14,0.21,0.30,0.41,0.55,0.74,1.0],
      "line":{"color":"#3666ff","width":3},"fill":"tozeroy","fillcolor":"rgba(54,102,255,0.12)" },
    { "type":"scatter","mode":"lines","name":"Perfect equality",
      "x":[0,1],"y":[0,1], "line":{"color":"#94a3b8","dash":"dash"} }
  ],
  "layout":{
    "title":"Lorenz curve — Gini ≈ 0.42",
    "xaxis":{"title":"Cumulative population share","range":[0,1]},
    "yaxis":{"title":"Cumulative income share","range":[0,1]},
    "width":500,"height":500
  }
}