Dear Sir/Madam, colleagues,

I tried to plot a concentration curve with the following commend from some literatures but did not get a figure.
Please kindly correct and guide me further.

glcurve outcome1 [aw=wgt], glvar(g1) pvar(p1) sortvar(v191) lorenz nograph
glcurve outcome2 [aw=wgt], glvar(g2) pvar(p2) sortvar(v191) lorenz nograph
glcurve outcome3 [aw=wgt], glvar(g3) pvar(p3) sortvar(v191) lorenz nograph
glcurve outcome4 [aw=wgt], glvar(g4) pvar(p4) sortvar(v191) lorenz nograph

label variable g1 "g1"
label variable g2 "g2"
label variable g3 "g3"
label variable g4 "g4"

graph twoway (line g1 p1, sort yaxis(1 2)) ///
(line g2 p2, sort yaxis(1 2)) ///
(line g3 p3, sort yaxis(1 2)) ///
(line g4 p4, sort yaxis(1 2)) ///
(function y=x, range(0 1) yaxis(1 2)) ///
, aspect(1) xtitle("cumulative proportion share, p") ///
title("Lorenz curve comparison") ///
ytitle("cumulative proportion wealth") ///
legend(label(1 "outcome1") label(2 "outcom2") label (3 "outcome3") label(4 "outcome4") ///
saving(test.gph)

Where outcome 1-4 are the dichotomous (0 1) and v191 is the continuous variable.
I tried to include all 4 outcomes in single figure as the inquality variable is the same.
Thanking in advance.

SHOW