Including totals in bar graph in Stata

Below is a worked example of including the totals into a bar graph:

I used the auto.dta dataset as an example. The commands I used are as below:

sysuse auto, clear
expand = 2, generate(duptag)
replace foreign = 3 if duptag == 1
label define origin 3 "Total", modify
graph bar (mean) price , over(rep78) over(for) showyvars ascategory asyvar legend(off)