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

st: Re: Differentiate one bar in a graph

From   Friedrich Huebler <>
Subject   st: Re: Differentiate one bar in a graph
Date   Mon, 11 Apr 2005 12:14:48 -0700 (PDT)


It would be easier for other list members to help if you could
provide more information about the kind of graph you are trying to
create. What command do you type to make the graph? Let's assume you
make a regular bar graph like this:

. sysuse auto, clear
. graph bar mpg trunk turn

In this case you could use the -bar()- option to assign colors to
individual bars.

. graph bar mpg trunk turn, bar(1, bcolor(navy)) bar(2,
bcolor(maroon)) bar(3, bcolor(navy))

This is explained in -whelp graph bar- under "lookofbar_options".

Friedrich Huebler

--- Taavi Lai <> wrote:
> Dear all,
> I have a bar graph and I'd like to change a color of one bar (or
> use sth 
> similar to show its relative location compared to other bars).
> Would appreciate your suggestions
> Taavi

Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
*   For searches and help try:

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