Graphics Reference
In-Depth Information
graph dot tenure, over(occ7,
descending
)
The
descending
option switches the
order of the markers. They still are
ordered according to the seven levels of
occupation, but the markers are
ordered from 7 to 1.
Uses nlsw.dta & scheme vg blue
Other
Labor
Operat.
Cler.
Sales
Mgmt
Prof
0
2
4
6
8
mean of tenure
graph dot tenure, over(occ7,
sort(occ7alpha)
)
We might want to put these markers in
alphabetical order (but with Other
appearing last). We can do this by
recoding
occ7
into a new variable (say
occ7alpha
), such that, as
occ7alpha
goes from 1 to 7, the occupations are
alphabetical. We recoded
occ7
with
these assignments: 4 = 1, 6 = 2, 2 = 3,
5=4,1=5,3=6,and7=7;see
[
R
]
recode
. Then, the
sort(occ7alpha)
option alphabetizes
the markers (but with Other still
appearing last).
Uses nlsw.dta & scheme vg blue
Cler.
Labor
Mgmt
Operat.
Prof
Sales
Other
0
2
4
6
8
mean of tenure
graph dot tenure, over(occ7,
sort(1)
)
Here, we sort the variables based on the
mean of
tenure
, yielding markers with
means in ascending order. The
sort(1)
option sorts the markers according to
the mean of the first
Cler.
Labor
Operat.
-variable, the
mean of
tenure
. In this case, there is
only one variable.
Uses nlsw.dta & scheme vg blue
y
Sales
Mgmt
Prof
Other
0
2
4
6
8
mean of tenure
The electronic form of this topic is solely for direct use at UCLA and only by faculty, students, and staff of UCLA.