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

Re: st: graph bar labels


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: graph bar labels
Date   Fri, 11 Nov 2005 09:28:00 +0100

Ricardo Ovaldia wrote:
> I will like to place the number of observation on top
> of each bar.  For example, using the auto data:
> . sysuse auto, clear
> . collapse (mean)  foreign (count)
> total=foreign,by(rep78)
> . graph bar  foreign, over( rep78)
>
> What I want is the number in the variable -total- on
> top of the corresonding graph.  I have not been able
> to do this and -blabel()- does not help.

. graph twoway 
    bar for rep78 
 || sc for rep78, mlab(total) mlabpos(12) ms(i)

-- 
[email protected]
+49 (030) 25491-361
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index