<>
Wait a minute! If you really go to such great lengths as to change the -var
labels-, you could also replicate the -by()- thing with -levelsof- and
then -gr combine- them.
****
sysuse auto, clear
*default with by()
*twoway (scatter mpg price), by(f, total rows(1))
qui levels for, local(mylev)
foreach lev of local mylev{
sc mpg pr if f==`lev', name(gr`lev', replace) nodraw title("`: label
origin `lev''")
}
*get graph for total
sc mpg pr, name(grtot, replace) nodraw title("Total")
*default after by()
graph combine gr0 gr1 grtot, rows(1)
*want them ordered differently...
graph combine grtot gr0 gr1, rows(1)
****
-findit grc1leg- could be handy then :-)
HTH
Martin
_______________________
----- Original Message -----
From: "Pamela Oliver" <[email protected]>
To: <[email protected]>
Sent: Saturday, April 11, 2009 12:05 AM
Subject: Re: st: Ordering graphs when using by()
I've added numbers to the beginnings of variable labels or string
variables to get them to sort the way I want them to. I don't know of any
more elegant solution.
Ricardo Ovaldia wrote:
I am using -twoway ,by( ,rows(1))- to output three graphs in one row.
However the graphs are ordered alphabetically. Is there a way to specify
or change the order within the row?
Thank you,
Mario.
Ricardo Ovaldia, MS
Statistician Oklahoma City, OK
*
* 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/
*
* 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/
*
* 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/