Statalist The Stata Listserver

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

st: multiple barplots wih CIs

From   "Daniel Exeter" <>
To   <>
Subject   st: multiple barplots wih CIs
Date   Tue, 6 Jun 2006 16:27:06 +1200

Hi folks, 

I've seen earlier listings that demonstrate how to use the twoway option
to graph CIs upon a barchart for 1 variable, but it all goes pearshaped
when I try to do the same approach with a second bar/CI combination -
the bars for the first variable are wide (all bars touching) and the
bars for the second variable are superimposed upon these, and are

Incidently, the syntax below also fails to show the lower confidence
value on the plot. If I flip the order of the rcap and bar statements in
the syntax below, I get an 'invalid syntax' error for the barwidth

Does anybody have any ideas on how to fix these errors, in V8.0


Lb = lower CI
Ub = upper CI
1 and 2 represent 2 separate time periods

graph twoway  rcap lb1 ub1 groupvar|| bar rate1 groupvar || rcap lb2 ub2
groupvar || bar rate2 groupvar,
 xtitle("Group variables") 
 xlabel(1(1)5) ylabel(0(25)100)
#d cr

*   For searches and help try:

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