Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: fine tuning a combination of three graphs


From   David Airey <[email protected]>
To   [email protected]
Subject   Re: st: fine tuning a combination of three graphs
Date   Sat, 20 Dec 2008 17:20:48 -0600

When you run the example, it puts the code on your results screen:


. gr_example2 combine5

-> preserve

-> sysuse lifeexp, clear
(Life expectancy, 1998)

-> gen loggnp = log10(gnppc)
(5 missing values generated)

-> label var loggnp "Log base 10 of GNP per capita"

-> scatter lexp loggnp, ysca(alt) xsca(alt) xlabel(, grid gmax) saving(yx)
(file yx.gph saved)

-> twoway histogram lexp, fraction xsca(alt reverse) horiz fxsize(25) saving(hy)
(file hy.gph saved)

-> twoway histogram loggnp, fraction ysca(alt reverse) ylabel(0(.1).2, nogrid) x
> label(,grid gmax) fysize(25) saving(hx)
(file hx.gph saved)

-> graph combine hy.gph yx.gph hx.gph, hole(3) imargin(0 0 0 0) graphregion(marg > in(l=22 r=22)) title("Life expectancy at birth vs. GNP per capita") note("Sour
> ce:  1998 data from The World Bank Group")

-> erase hy.gph

-> erase hx.gph

-> erase yx.gph

-> restore


On Dec 19, 2008, at 3:35 PM, Michael Foster wrote:

Forgive me if this went through already--I was having an e-mail problem

I'm trying to manipulate -graph combine- to combine three graphs I've created.
here's the gist of what I'm doing:

sysuse auto
twoway scatter turn length , name(graph2) nodraw  title(Spot #2)
twoway scatter mpg length , name(graph3) nodraw   title(Spot #3)
twoway scatter weight length , name(graph4) nodraw title(Spot #4)
graph combine graph2 graph3 graph4 , hole(1) title("Hole", ring(0)
pos(10) size(small) alignment(middle) justification(center) width(65)
height(35) )

I want to shrink the hole to about 50% of its size and use the extra
space to make the other graphs larger.
It's ok if graph4 is bigger than graph2 and graph3, but I'd like the
latter two to be the same size.
And I'd like to have them all be as close to the same size as possible.

Suggestions?

Thanks--michael foster
UNC School of Public Health
*
*   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/



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