Graphics Reference
In-Depth Information
graph bar propval100, over(nsw) over(division) nofill asyvars
ytitle("% homes over $100K") ylabel(0(10)80, angle(0)) b1title(Region)
legend(rows(1) position(1) ring(0)) blabel(bar)
We want each bar to be labeled with
the height of the bar, and Bar : Legend
(130) shows how we can do this. This
section shows how to use the blabel()
(bar label) option to label the bars in
lieu of legends. blabel() also can label
the bars with their height, using
blabel(bar) .
Uses allstates.dta & scheme vg past
80
North
South
West
70
66.5667
60
53
52.46
50
40
28.9125
30
19.85
18.46
20
11.6
11.35
10.0143
10
0
N. Eng. Mid Atl E.N.C. W.N.C. S. Atl. E.S.C. W.S.C.MountainPacific
Region
graph bar propval100, over(nsw) over(division) nofill asyvars
ytitle("% homes over $100K") ylabel(0(10)80, angle(0)) b1title(Region)
legend(rows(1) position(1) ring(0)) blabel(bar, format(%4.2f) )
We want the labels for each bar to end
in two decimal places, and we see in
Bar : Legend (130) that we can use the
format() option to format these
numbersaswewish.
Uses allstates.dta & scheme vg past
80
North
South
West
70
66.57
60
53.00
52.46
50
40
28.91
30
19.85
18.46
20
11.60
11.35
10.01
10
0
N. Eng. Mid Atl E.N.C. W.N.C. S. Atl. E.S.C. W.S.C.MountainPacific
Region
The electronic form of this topic is solely for direct use at UCLA and only by faculty, students, and staff of UCLA.
Search WWH ::




Custom Search