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

st: AW: RE: Caption on a bar graph

From   "Martin Weiss" <>
To   <>
Subject   st: AW: RE: Caption on a bar graph
Date   Mon, 19 Oct 2009 17:40:06 +0200


To echo Nick`s sentiment, I have now tried for some time to get Stata to
behave "irrationally" with the -caption-, and have not succeeded, in spite
of my honest attempts to reproduce the command provided by Dorothy as much
as possible. As a last resort, she could still drag the thing around in the
graph editor...


-----Ursprüngliche Nachricht-----
[] Im Auftrag von Nick Cox
Gesendet: Montag, 19. Oktober 2009 17:39
Betreff: st: RE: Caption on a bar graph

I don't understand "underneath (or on top of, I guess)". 

It is easier to address problems reproduced with datasets everyone can
access and stripped of inessentials. 

With commands like these: 

. sysuse auto
(1978 Automobile Data)

. graph bar turn trunk , over(foreign) caption(whatever)

. graph bar turn trunk , over(foreign) caption(whatever, pos(12))

. graph bar turn trunk , over(foreign) caption(whatever, pos(12)

I can move the caption around. 


Dorothy Bridges

My caption is appearing underneath (or on top of, I guess) the
category axis labels on my bar graph.  I can't fathom why (I've tried
specifying a different ring option, no luck).  My code is as follows:

graph bar seriesAG-seriesMNF, over(year, label(labsize(medium)))
percentages stack
graphregion(fcolor(white) lcolor(white) margin(zero))
plotregion(fcolor(white) lcolor(white) ilcolor(white))
title("xxxx",color(black) placement(west) justification(left)
caption("Sources: xxxx", size(vsmall) placement(west)
legend(cols(1) span position(3) stack region(lcolor(white)) title(" ",
order(10 9 8 7 6 5 4 3 2 1) rowgap(7) keygap(1)
label(1 "Agriculture") label(2 "Mining, Oil & Gas") label(3
label(4 "Wholesale" "& Retail Trade") label(5 "Financial Services")
label(6 "Other Services") label(7 "Public Administration")
label(8 "Utilities") label(9 "Transport" "& Communication")
label(10 "Manufacturing"))
xsize(7.5) ysize(4.1)
ylabel(0 "0%" 20 "20%" 40 "40%" 60 "60%" 80 "80%" 100
"100%",glwidth(thin) glcolor(black) angle(horizontal) labsize(medium))

*   For searches and help try:

*   For searches and help try:

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