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

st: RE: -graph combine- with equal size


From   "David Harrison" <david.harrison@icnarc.org>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: -graph combine- with equal size
Date   Tue, 19 Apr 2005 09:35:14 +0100

One easy option is to leave the space for the axis, labels and title even when the axis is turned off by using -xscale(off fill)- and -yscale(off fill)-. This will, however, leave you with big gaps between the combined graphs. Using -imargin(zero)- will help, but it still may not be ideal.

The problem with -fxsize()- and -fysize()- as you are trying to use them is that they force the size of the total "graph region" (including axes, labels etc) rather than the "plot region". I do not know any formula for how much space the axes take up on the graph, so I have had to resort to guessing the -fxsize()- and -fysize()- values. If anyone can enlighten me, please do!

Note that you only need to use -fxsize()- when the y-axis is off, and -fysize()- when the x-axis is off. Also, the -xsize()- and -ysize()- options are doing nothing as they are ignored when the -combine- comes along.

Code something like this should work...

quantile pred1, xscale(off) fysize(38) ///
	name(agquant, replace)
quantile pred2, yscale(off) xscale(off) ///
	fysize(38) fxsize(57) ///
	name(clofoquant, replace)	
quantile pred3, name(ofoquant, replace)
quantile pred3, yscale(off) fxsize(57) ///		 
	name(maxquant, replace)
graph combine agquant clofoquant ofoquant maxquant, ///
	xcommon ycommon

Hope this helps

David

-----Original Message-----
From: Daniel Mueller [mailto:danielix@gmx.net]
Sent: 18 April 2005 21:26
To: Statalist
Subject: st: -graph combine- with equal size


Hi,

I was sure somebody asked that before, but my search in the 
archives was not successful.

I want to merge four quantile-plots into one, where I omit 
-xscale- in the upper two graphs, and -yscale- in the graphs 
on the right (see code below). I want to obtain four graphs 
of the same vertical and horizontal size and try to 
accomplish that with -ysize()-, -xsize()- -fyscale()-, 
fxscale()-. However, these options seem to be overridden and 
all four graphs are of slightly different size. How can I 
get four graphs of exactly the same size in -graph combine-?

Thanks a lot in advance!
Daniel

--
quantile pred1, xscale(off) ///
	ysize(4) xsize(4) fysize(110) fxsize(110) ///
	name(agquant, replace)
quantile pred2, yscale(off) xscale(off) ///
	ysize(4) xsize(4) fysize(110) fxsize(110) ///
	name(clofoquant, replace)	
quantile pred3, ysize(4) xsize(4) ///
	fysize(110) fxsize(110) name(ofoquant, replace)
quantile pred3, yscale(off) ///
	ysize(4) xsize(4) fysize(110) fxsize(110) ///		 
name(maxquant, replace)
graph combine agquant clofoquant ofoquant maxquant, ///
	xcommon ycommon
--

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



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