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

RE: st: blabel(group) for bar graphs

From   Finne Håkon <>
To   <>
Subject   RE: st: blabel(group) for bar graphs
Date   Mon, 13 Sep 2004 17:15:15 +0200

Thanks, Erik;

this gives useful diagnostic information for the debuggers among us.

As for "first over() group", it should be referring to the first of the two or three permitted over(), e.g. rep78 in the following example:
-graph bar headroom trunk, over(rep78) over(foreign) blabel(group)-
or foreign in the following example:
-graph bar headroom trunk, over(foreign) over(rep78) blabel(group)-
both of which give further diagnostic information (also, of course, when run with -hbar- instead of -bar-).

-- Håkon

-----Original Message-----
From: [] On Behalf Of Eric G. Wruck
Sent: 13. september 2004 15:58
Subject: Re: st: blabel(group) for bar graphs

Håkon wrote:

>Dear Statlisters,
>the admittedly nonsensical example below,
>sysuse auto, clear
>graph bar headroom trunk, over(foreign) blabel(group)
>will produce bar labels inconsistent with labels on the category axis. What have I done to make all cars domestic?
>One should also think it possible to reproduce this behavior with
>graph hbar headroom trunk, over(foreign) blabel(group)
>and yet another surprise -- have I suddenly moved abroad?

I took a look at this too.  First, note that when I use the on-line documentation, I learn about the blabel(group) option that:

group...label is first over() group

Now, I wasn't sure what "first over() group" meant but I thought I'd try something else, namely:

graph bar headroom trunk, over(foreign, descending) blabel(group)

This is your first graph but with the descending option included in over().  This then changed the labels from Domestic to Foreign, the thing you were pointing out that happened when you switched from bar to hbar.  I'm guessing that bar & hbar may use a different internal sequence so that what is first in the one graph may not come first in the other.

Best wishes,




       Eric G. Wruck
       2535 Sherwood Road
       Columbus, OH  43209

       home:    614.237.6511
       office:  614.231.5034
       eFax:    614.573.6639


*   For searches and help try:

*   For searches and help try:

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