[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: twoway bar: Can't control the bar colors
seems this posting missed the list yesterday for unknown reasons, so here it
I want to graph a series of frequency distributions of integer point scales,
each with two cut points.
One example: Scale 0-20, cut points at 7 and 8 -> three intervals (0-6; 7;
There are several graph solutions (first would be the histogram) but I
decided to collapse the data to a frequency distribution:
...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
This gives me the graph I want, except that I would like to change the bar
colors of the three graphs to red, yellow and green.
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)
But I can't see the difference of my command to the description in "help
barlook_options" under "Remarks":
"barlook_options are also allowed as options with graph twoway bar and graph
twoway rbar, as in
. graph twoway bar yvar xvar, color(green)"
Im using Stata 9.2 (Aug 2006-Version) on Windows XP.
This must be some kind of easy mistake but I'm not getting it. Anybody got
Hesse State Health Office
* For searches and help try: