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: RE: graph hbar blabel and text option Stata 11

From   Nick Cox <>
To   "''" <>
Subject   st: RE: graph hbar blabel and text option Stata 11
Date   Mon, 24 Oct 2011 14:44:29 +0100

Without getting into specifics, this strikes me as very much a problem in which you should reduce your dataset to what needs to be plotted (-collapse- yields a dataset of means directly) and then use -graph twoway bar-. You could make some progress with -graph hbar- in solving these problems but I suspect not all. 

But specifically with -blabel()- the options are precisely what is documented. The scope for subverting them is about zero. 

The -twoway- way offers much greater control. 

I note the absence of complete documentation of exactly what you typed. This never does any harm. 


Kaulisch, Marc

I am constructing a (simple) graph hbar (mean)... Graph with four yvars
and a one over-var. While polishing the graph some questions appear:

1. Is it possible to add a (useful) blabel command?
I use the option
. blabel(bar, pos(center) format(%2.1fc) color(white)) 
But now I want to add a total outside the bar. Is this possible?
Adding blabel(total) changes the values of the barlabels into cumulative
sums which is not what I want...

2. Would it be possible to change the color of specific barlabels?
Giving my scheme some bars are dark and some light. Using white is great
for the dark ones but not for the light ones...

3. I would like to add text to each bar at the end of x-axis. Which are
the xaxis coordinates for the bars?
I see that text(13 1) places the text at the bottom and text(13 100) at
the top, but is there a way to identify the right place for each bar
automatically? Or is this a trial and error process?

*   For searches and help try:

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