Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Adding a bar for total in bar graph over category

From   "Nick Cox" <>
To   <>
Subject   st: RE: Adding a bar for total in bar graph over category
Date   Fri, 9 Apr 2010 10:24:50 +0100

Here's a work-around on a similar problem. 

sysuse auto, clear
expand 2
replace foreign = 2 in 75/L
label def origin 2 "Total", add
graph bar (mean) mpg, over(foreign)

Your equivalent of 75 will be 1 more than the number of observations in your dataset. 


Mehtabul Azam

I have a categorical variable area (Urban & Rural), and i am making a
bar graph over(area). poor is indicator for being poor.
i want to add a bar for total (Urban & Rural). However, over
suboptions does not seem to have anything which add a bar for total
graph bar (mean) poor [aw=weight], over(area) over(year)
Is there a way to add up a bar for total (with urban and rural categories)?

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index