Graphics Reference
In-Depth Information
graph hbar prev exp tenure ttl exp, ascategory xalternate
over(age3, relabel(1 "34-37 yrs" 2 "38-41 yrs" 3 "42-46 yrs"))
yvaroptions(relabel(1 "Previous Exp" 2 "Current Exp" 3 "Total Exp"))
x
If we wish, we can move the
-axis to
the opposite side of the graph. Here, we
add the xalternate option, which
moves the labels for the
Previous Exp
34−37 yrs
Current Exp
Total Exp
-axis to the
opposite side, in this case from the left
to the right. You can also use the
yalternate option to move the
x
Previous Exp
38−41 yrs
Current Exp
y
-axis
Total Exp
to its opposite side.
Uses nlsw.dta & scheme vg s2c
Previous Exp
42−46 yrs
Current Exp
Total Exp
0
5
10
15
In the previous examples, we saw that the relabel option can be used in the over()
option to control the labeling of over() variables and can be used within yvaroptions()
to control the labeling of multiple
y
-variables (provided that the ascategory option is used
to convert the multiple
-variables into categories). We will further explore other over()
options, which can be used with either over() or yvaroptions() .
y
graph bar wage, over(occ7, label(nolabels) )
We can use the label(nolabels)
option to suppress the display of the
labels associated with the levels of
occ7 .The label(nolabels) option is
generally not useful alone but is very
useful in combination with other means
to label the bars. Consider the next
example.
Uses nlsw.dta & scheme vg s2c
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