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

st: Re: Bar labels in stacked bar chart

From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   st: Re: Bar labels in stacked bar chart
Date   Sun, 11 Apr 2004 21:30:52 -0700 (PDT)


Thank you, -catplot- is easier to use than -graph bar- because
several steps can be skipped. Another advantage is that -catplot-
works with numeric values and strings.

However, with -graph bar yvars, over(varname) stack- it is possible
to stack the bars in a specific order by varying the order in which
the yvars are listed.

. sysuse auto
. tab rep78, gen(rep)
. graph bar rep3 rep4 rep5 rep1 rep2, over(foreign) stack percent

Can the same be accomplished with -catplot-?

Thank you.

Friedrich Huebler

--- Nick Cox <[email protected]> wrote:
> Another way to do it is (in total) 
> . catplot bar rep78 for , percent(for)  asyvars stack 
> 	blabel(bar, pos(center) format(%3.2f))
> where I've added a format control. Here -catplot- can be 
> installed from SSC.

Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
*   For searches and help try:

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