> program mygraphmatrix
> *! NJC 1.0.0 12 June 2003
> version 8
> syntax varlist(numeric) [if] [in] [, * ]
>
> marksample touse
> qui count if `touse'
> if r(N) == 0 error 2000
>
> set graphics off
>
> qui foreach y of local varlist {
> local ny = 1
> foreach x of local varlist {
> tempname f
> if `ny' > 1 {
> local yt
> }
> else {
> local yt : variable label `y'
> if `"`yt'"' == "" local yt "`y'"
> }
> if "`x'" == "`y'" {
> quantile `x', yti("`yt'")
> saving(`f'.gph)
> }
> else {
> lowess `y' `x', title("") note("") ///
> legend(off) ///
> yti(`"`yt'"') saving(`f'.gph)
> `options'
> }
> local files `"`files' "`f'""'
> local FILES "`FILES' `f'.gph"
> local ny = `ny' + 1
> }
> }
>
> set graphics on
>
> graph combine `files', imargin(zero)
>
> foreach F in `FILES' {
> erase `F'
> }
> end
The two graphics commands should be
if `touse'
to be compatible with the syntax.
Nick
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/