I'm writing a new command that produce a graph and allow the use of by() option.
However, given that I can not determine a priori the number of
mofalities of the by(variable) I can not set the line pattern of the
outputed graph.
My question is how to force stata to use different line pattern in the
graph. Below you find a piece of my ado file
local listvar "`listvar' `newvar`i''" // set the list of variable
used in the graph
** and here is my graph command
if "`graph'" != "" {
qui gen `p'=`pvar'
label variable `p' "uniform distribution curve"
gen byte `pe'=1
label variable `pe' "perfect equality line"
if `nv' > 1 {
local yti `"yti("`curvelabel' `varlist' (by `by')")"'
}
twoway scatter `listvar' `pvar' if `touse' , ///
ms(i ..) c(l ..) `yti' legend(col(1)) `options' || line `pe'
`pvar' , lpattern(dot) || line `p' `p' , lpattern(dash_dot)
}
--
AbdelRahmen El Lahga
Assistant Professor
University of Tunis
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/