Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: graph bar - how to add 'external' label above stacked bar chart

From   Vianney <>
Subject   st: graph bar - how to add 'external' label above stacked bar chart
Date   Wed, 16 Feb 2011 18:40:32 -0500

Dear STATA users,

I am trying to create a stacked bar chart that graphs 2 volumes (say
variables 'A' & 'B'), but that also includes a label on top of each
bar. This label, however, is neither variable `A' nor `B', but a third
piece of information, 'C'

Specifically, it would appear that the option blabel() is not
appropriate here, as my variable 'C' is NOT:

* the bar height
* the cumulative bar height
* the name of yvar
* the name of the first over() group

> It's actually a percentage value that is in my dataset, where C = (B/(A+B))
> How would I modify the STATA command below to add 'C' as a label on top of each stacked bar?

#delimit ;
graph bar (sum) A B, over(yearnum) over(country) stack
#delimit cr

Many thanks for your help!

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index