Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: grc1leg and ysize(#) & xsize(#) options


From   "Jann Ben" <ben.jann@soz.gess.ethz.ch>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: grc1leg and ysize(#) & xsize(#) options
Date   Thu, 18 Aug 2005 09:51:43 +0200

Hiroshi,

. graph display GRAPH_06, ysize(5.25) xsize(9.0)

should solve the problem.
ben

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of 
> Hiroshi Maeda
> Sent: Thursday, August 18, 2005 6:53 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: grc1leg and ysize(#) & xsize(#) options
> 
> 
> 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
 

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index