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

st: RE: Bar color in complex bar graph


From   "David Harrison" <david.harrison@icnarc.org>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Bar color in complex bar graph
Date   Fri, 27 May 2005 08:36:19 +0100

You need to tell it to change bar 1 (all of the bars are "bar 1" because you are using -ascategory-), so add:

bar(1, bcolor(red*.5) blc(red*.8))

(Although I have to say red*.5 is one of the most hideous colours known to mankind... what's wrong with blue?)

David

-----Original Message-----
From: Margo Schlanger [mailto:mschlanger@wulaw.wustl.edu]
Sent: 27 May 2005 02:15
To: statalist@hsphsun2.harvard.edu
Subject: st: Bar color in complex bar graph


I feel kind of dumb for this one, but I've worked on it and come up only
with a very tedious workaround.  I'm hoping someone knows a better way
for next time . . .

I'm running a fairly complicated bar chart:

graph bar (asis) portion1-portion12 if year > 1983,  ylabel(0(.1).2,
grid) ascategory   by(dummy year, [other options])

the variables (portion1-portion12) name 12 variables, each of which is
labeled.

So here's my question.  It defaults to blue, and I need it to be red.
(In particular, bcolor(red*.5) blc(red*.8)).  But I can't figure out how
to get the color to work as syntax).  No matter where I put it, I get an
error message.  (I can do this by omitting the ascategory, and then
doing it bar by bar, but then I have to label the bar widths, too, and I
figure there's got to be a better way.)

Any help is much appreciated.

Margo



_____________________
Margo Schlanger
Professor of Law
Washington University in St. Louis
One Brookings Drive
Campus Box 1120
St. Louis, MO  63130
(314) 935-8242
mschlanger@wulaw.wustl.edu
http://schlanger.wustl.edu
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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