Graphics Reference
In-Depth Information
graph bar wage hours ttl exp, ascategory over(collgrad)
yvaroptions(label(alternate))
This is another example of using the
label(alternate) option, but in this
case, it is used in the context of
alternating labels created by multiple
y
-variables converted to categories
using the ascategory option. In such a
case, the option is specified as
yvaroptions(label(alternate)) .
Uses nlsw.dta & scheme vg s2c
mean of wage
mean of hours
mean of ttl_exp
mean of hours
mean of ttl_exp
mean of wage
not college grad
college grad
graph bar wage hours ttl exp, ascategory over(union) nolabel
If we add the nolabel option, the
names of the variables are shown
instead of the value labels.
Uses nlsw.dta & scheme vg s2c
wage
hours
ttl_exp
wage
hours
ttl_exp
nonunion
union
graph hbar wage, over(occ5, label( labcolor(green) ))
over(collgrad, label( labcolor(maroon) labsize(small) ))
We can change the color of the labels
using the labcolor() option. Here, we
make the label for occ5 green and the
label for collgrad maroon. We also
use labsize(small) to make the labels
for collgrad small. See Styles : Colors
(328) and Styles : Textsize (344) for more
details about other values you could
choose.
Uses nlsw.dta & scheme vg s2c
Prof/Mgmt
Sales
Clerical
not college grad
Labor/Ops
Other
Prof/Mgmt
Sales
Clerical
college grad
Labor/Ops
Other
0
5
10
15
mean of wage
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