Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Lorenz curve graph options: can't get legend to work

From   "philippe van kerm" <[email protected]>
To   <[email protected]>
Subject   RE: st: Lorenz curve graph options: can't get legend to work
Date   Wed, 26 Apr 2006 15:29:03 +0200


You are right, -glcurve- uses it's own legend and does not seem to pay
attention to the legend you supply.  Anyway, if you want to produce
'publication quality' pictures and need maximum control over your plots,
you will be better off splitting the estimation step and the plotting
step: (i) use -glcurve- and save the coordinates in new variables, then
(ii) use -twoway- to produce the final plot. For example, 

sysuse auto, clear
rename price hhsub
drop if rep78==5
rename rep78 level2

// estimate and save coordinates in new variables
glcurve hhsub [aw=weight] if level2~=.&level2~=1, ///
	lorenz by(level2) glvar(gl) split pvar(p) nogr

// plot results (notice the lpattern() option for changing the pattern -
your last question)
tw  line gl* p , lpattern(solid dash "._")  sort  ///
	|| function equality=x , lwidth(medthick)  ///
	legend(label(1 "Secondary") label(2 "VET") label(3 "Tertiary")
label(4 "Perfect equality")) ///
	xtitle("Cumulative share of population")  ///
	ytitle("Cumulative share of benefits") ///
	title("Equity in Educational Public Subsidies") ///
	subtitle("Albania, 2005") ///
	subtitle("Lorenz curve") ///
	note("Source: LSMS 2005.")

Good luck,


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept 

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index