Graphics Reference
In-Depth Information
graph dot wage, over(occ7) over(south, relabel(1 "N & W" 2 "South") )
We can use the relabel() option to
change the labels displayed for the
levels of south , giving the
Prof
Mgmt
-axis more
meaningful labels. Note that we wrote
relabel(1 "N & W") ,not relabel(0
"N & W") , since these numbers do not
represent the actual levels of south but
the ordinal position of the levels, i.e.,
first and second.
Uses nlsw.dta & scheme vg past
x
Sales
N & W
Cler.
Operat.
Labor
Other
Prof
Mgmt
Sales
South
Cler.
Operat.
Labor
Other
0
5
10
15
mean of wage
graph dot prev exp tenure ttl exp, over(occ5) ascategory
This graph dot command has multiple
y
-variables but uses the ascategory
option to plot the different
mean of prev_exp
Prof/Mgmt
mean of tenure
-variables
as if they were categorical variables.
The dots for the different
y
mean of ttl_exp
mean of prev_exp
Sales
mean of tenure
-variables
are plotted on different lines using the
same symbol, and each line is labeled
on the
y
mean of ttl_exp
mean of prev_exp
Clerical
mean of tenure
mean of ttl_exp
mean of prev_exp
-axis rather than using a
legend. The default labels on the
x
Labor/Ops
mean of tenure
mean of ttl_exp
x
-axis
mean of prev_exp
are not bad, but we might want to
change them.
Uses nlsw.dta & scheme vg past
Other
mean of tenure
mean of ttl_exp
0
5
10
15
graph dot prev exp tenure ttl exp, over(occ5) ascategory
yvaroptions(relabel(1 "Previous" 2 "Current" 3 "Total"))
If we had an over() option, we could
use the relabel() option to change the
labels on the
Previous
Prof/Mgmt
Current
x
-axis. But since we have
Total
Previous
multiple
-variables that we have
treated as categories, we then use the
yvaroptions(relabel()) option to
modify the labels on the
y
Sales
Current
Total
Previous
Clerical
Current
Total
-axis.
Uses nlsw.dta & scheme vg past
x
Previous
Labor/Ops
Current
Total
Previous
Other
Current
Total
0
5
10
15
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