Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: twoway bar: Can't control the bar colors


From   "Svend Juul" <SJ@SOCI.AU.DK>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: twoway bar: Can't control the bar colors
Date   Fri, 15 Sep 2006 10:11:03 +0200

Stefan wrote:
 ...and do a combination of three twoway bar graphs:
twoway bar count points if points <= 6 || bar count points if points ==
7 ||
bar count points if points >= 8 & points <= 20

Using the "color" option for each graph I always get error R198 "option
color() not allowed". Code Example: 
twoway bar count points if points <= 6, color(red) 

Im using Stata 9.2 (Aug 2006-Version) on Windows XP.
----------------------------------------------------------------

I use Stata 9.2 on Windows XP, too, and the following works perfectly:

clear
set obs 21
gen points = _n-1
gen count=round(50*uniform())

twoway                                            ///
  (bar count points if points <= 6, color(red))   ///
  (bar count points if points == 7, color(green)) ///
  (bar count points if points > 7, color(blue))

It also works with the || notation. So I have no clue as to the nature
of your problem.

Svend
__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Vennelyst Boulevard 6
DK-8000  Aarhus C, Denmark
Phone: +45 8942 6090
Home:  +45 8693 7796
Email: sj@soci.au.dk
__________________________________________ 

*
*   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