Graphics Reference
In-Depth Information
graph bar (sum) prev exp tenure, stack over(grade4) blabel(total)
As compared with the prior example,
this example uses the blabel(total)
option to display the results as totals.
Now, the labels represent the
cumulative total height of the bar.
Uses nlsw.dta & scheme vg past
11696.2
6863.44
6221.99
5990.21
3417.64
3387.6
3186.63
1865.06
Not HS
HS Grad
Some Coll
Coll Grad
sum of prev_exp
sum of tenure
We have seen a variety of ways that you can use the blabel() option to label the bars.
In addition, Stata offers a variety of options you can use to control the display of these
labels. Below, we will consider some of these options that allow you to customize the way
these labels are displayed. These example begin using the vg palec scheme.
graph hbar hours, over(occ7, label(nolabels)) blabel(group)
Consider this graph of the average
hours worked by occupation. We add
l a bels of the occupation at the top of
each bar but suppress the label at the
bottom of each bar. The label for the
second bar runs off the right of the
graph. Fortunately, Stata offers us a
number of options to control where
these labels are displayed.
Uses nlsw.dta & scheme vg palec
Prof
Mgmt
Sales
Cler.
Operat.
Labor
Other
0
10
20
30
40
mean of hours
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