Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "B. Timothy Walsh" <btw1@columbia.edu> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: formatting bar graph by(groups) |
Date | Wed, 13 Nov 2013 10:11:39 -0500 |
The command I am using includes the following elements, plus some formatting directions:
graph bar (asis) Baseline Change, stack over(Treatment) nofill /// by(study, cols(3) holes(4 6) title("Title")The first 3 graphs—2 with 3 bars and 1 with 2—are fine. Each plot area is of the same width and the bars in the 2-bar graph are wider so they are nicely centered in the plot region. The problem is with the 4th graph: the 2 bars are of the same width as in the 3-bar graphs, so they are over to the left and there's a space on the right side where a third bar would go, even though there is no third Treatment in that study.
I would like the bars in the 4th graph to be centered within the plot region, and of the same width as the other 2-treatment graph.
I hope this description is clear. Happy to supply any additional information. Thanks in advance!
Tim * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/