<>
You want to add - yscale(rev)- to the -twoway- call for full compliance with
your request...
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Martin Weiss
Gesendet: Freitag, 13. November 2009 23:23
An: [email protected]
Betreff: st: AW: graphical representation of orthogonal pairings
<>
I think the pattern is clear, so you can complete this exercise yourself:
*************
clear*
set obs 9
egen byte a=seq(), to(3) block(3)
gen str1 b=cond(mod(_n,3)==2,"b", /*
*/ cond(mod(_n,3)==0,"c","a"))
gen byte group=1
l, noo sepby(a)
encode b, gen(newb)
tostring a, gen(newa)
gen str2 marker=newa+b
tw (scatter a newb, mlabel(marker)) /*
*/ (pcarrowi .9 .9 .9 1.1 /*
*/ 1.1 .9 1.1 1.1 /*
*/ .9 .9 1.1 .9 /*
*/ .9 1.1 1.1 1.1, msize(zero))
/*
*/ (pcarrowi 1.9 1.9 1.9 2.1 /*
*/ 2.1 1.9 2.1 2.1 /*
*/ 1.9 1.9 2.1 1.9 /*
*/ 1.9 2.1 2.1 2.1,
msize(zero)) /*
*/ (pcarrowi 2.9 2.9 2.9 3.1 /*
*/ 3.1 2.9 3.1 3.1 /*
*/ 2.9 2.9 3.1 2.9 /*
*/ 2.9 3.1 3.1 3.1,
msize(zero)), /*
*/ xla(1 2 3) yla(1 2 3) legend(off)
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Michael
McCulloch
Gesendet: Freitag, 13. November 2009 22:07
An: Statalist Statalist
Betreff: st: graphical representation of orthogonal pairings
Hello,
The following code creates a list of orthogonal pairings of two
variables.
My question is whether it's possible with Stata to create a graphical
representation of these pairings, appearing in rows with a box drawn
around each pair:
1a 1b 1c
2a 2b 2c
3a 3b 3c
**********
clear
set obs 3
gen a = _n
gen group=1
list
save a, replace
clear
set obs 3
gen b="a"
replace b="b" in 2
replace b="c" in 3
gen group=1
list
joinby group using a.dta
sort a b
list a b group
***********
Michael McCulloch
Pine Street Foundation
124 Pine Street
San Anselmo, CA 94960-2674
tel: 415-407-1357
fax: 206-338-2391
[email protected]
*
* 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/