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

RE: st: Stata 8 graphics, bar charts (stacked), color of labels

From (Derek Wagner, StataCorp)
Subject   RE: st: Stata 8 graphics, bar charts (stacked), color of labels
Date   Thu, 16 Sep 2004 08:21:56 -0500

Roger Newson wrote:

> with the -bar(#, bcolor())- option I can only determine the color 
> (and characteristics) of the bars - not of the labels (I am right?).
> For a dark bar color, for example, I would like to use white labels 
> and vice versa. Is there any way to do that (without using boxes)?

If you would like dark bars and white labels within the bars, you 
could use the -blabel- option with the -color- suboption.  You will 
also want to put the labels within the bars (instead of on top) 
because a white label would "disappear" on a white background- so
you could use the -position- suboption for that purpose.  For
example, your command might look like the following:

. graph bar x, over(y) blabel(bar, color(white) position(inside))

Derek Wagner
*   For searches and help try:

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