On 8/17/07, b. water <[email protected]> wrote:
> dear statalisters,
>
> windows xp pro sp2, stata 8.2,
>
> i am creating a few gr hbar graphs with this syntax:
>
> gr hbar noof if timetest=="varlists", over(test, sort (pos)) ytitle("No. of
> studies") ysc(r(0 35)) ylab(0 (5) 35)
>
> because the varlists are different for each graph, without modifications, i
> ended up with fixed size graphs, but where the bars and axes are squeezed
> (some are difficult to read). i can correct this somewhat with ysize &
> labsize but the results are not aesthetically pleasing because i just could
> not get the right ysize(s) so that i would have consistent relative
> appearances of the e.g. font sizes (of the axes) and the bars. i hope i am
> making sense.
No, or at least not to me.
In the following example:
sysuse auto,clear
graph hbar mpg, over(fore) name(gr1,replace)
graph hbar mpg, over(rep) name(gr2,replace)
you would want the bars in the two graphs to be the same size?
One way would be add empty categories so both graphs had the same
number of categories:
sysuse auto,clear
graph hbar mpg, over(fore) name(gr1,replace)
graph hbar mpg, over(rep) name(gr2,replace)
set obs 77
replace fore = -5 in 75
replace fore = .5 in 76
replace fore = 5 in 77
graph hbar mpg, over(fore, relabel( 1 `"" " " ""' 3 `"" " " ""' 5 `""
" " ""')) ///
name(gr3,replace)
Scott
*
* 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/