Dear Stata users,
I've just learned about -grc1leg- through exchanges among list members
yesterday and now have a question of my own (I am using Stata9 in a Win-XP
PC). It seems to me that -graph combine- respects ysize(#) & xsize(#)
options documented in Graphics Manual (p. 82) but -grc1leg- doesn't. Below
is a mock graphics session I concocted for an illustration purpose.
===== Start of my demonstration =====
version 9
#delimit;
clear;
set obs 5;
gen YEAR=.;
replace YEAR=1890 in 1;
replace YEAR=1900 in 2;
replace YEAR=1910 in 3;
replace YEAR=1920 in 4;
replace YEAR=1930 in 5;
gen CDR_01=.;
replace CDR_01=23681 in 1;
replace CDR_01=18316 in 2;
replace CDR_01=15269 in 3;
replace CDR_01=11494 in 4;
replace CDR_01=7812 in 5;
gen CDR_02=.;
replace CDR_02=2029 in 1;
replace CDR_02=1435 in 2;
replace CDR_02=1081 in 3;
replace CDR_02=779 in 4;
replace CDR_02=401 in 5;
set scheme s2mono;
graph twoway (line CDR_01 YEAR) (line CDR_02 YEAR),
legend(label(1 "CDR_01") label(2 "CDR_02"))
saving(GRAPH_01, replace);
graph twoway (line CDR_01 YEAR) (line CDR_02 YEAR),
legend(label(1 "CDR_01") label(2 "CDR_02"))
saving(GRAPH_02, replace);
graph twoway (line CDR_01 YEAR) (line CDR_02 YEAR),
legend(label(1 "CDR_01") label(2 "CDR_02"))
saving(GRAPH_03, replace);
graph twoway (line CDR_01 YEAR) (line CDR_02 YEAR),
legend(label(1 "CDR_01") label(2 "CDR_02"))
saving(GRAPH_04, replace);
graph combine GRAPH_01.gph GRAPH_02.gph GRAPH_03.gph GRAPH_04.gph,
ysize(5.25) xsize(9.0)
saving(GRAPH_05, replace);
grc1leg GRAPH_01.gph GRAPH_02.gph GRAPH_03.gph GRAPH_04.gph,
legendfrom(GRAPH_04.gph)
ysize(5.25) xsize(9.0)
saving(GRAPH_06, replace);
===== End of my demonstration =====
When I use -graph combine-, I get a combined graph in the size I desire
(GRAPH_05). But when I combine the same set of graphs using -grc1leg-, I
get a smaller graph (GRAPH_06). One can see the difference between those
two graphs when one prints them from Stata or a word processing program.
Is this because -grc1leg- was written for Stata8 and it's not fully
compatible with Stata9? Is there any way to make -grc1leg- respect
ysize(#) & xsize(#) options? I find -grc1leg- very attractive and would
not like to give up on it just yet. Thank you. ---Hiroshi
---------------------------------
Hiroshi Maeda
University of Illinois at Chicago
*
* 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/