Graphics Reference
In-Depth Information
graph dot tenure prev exp, over(occ7, sort(1)) over(collgrad, descending )
We add the descending option to the
second over() option, and the levels of
collgrad are now shown with college
graduates appearing first.
Uses nlsw.dta & scheme vg blue
Labor
Operat.
Cler.
college grad
Sales
Mgmt
Prof
Other
Cler.
Labor
Other
not college grad
Operat.
Sales
Mgmt
Prof
0
2
4
6
8
10
mean of tenure
mean of prev_exp
6.3
Controlling the categorical axis
This section describes ways that you can label the categorical axis in dot plots. Dot plots,
like bar and box plots, are different from other plots since their
x
-axis is formed by categori-
cal variables. (Remember that Stata calls the axis with the categorical variable(s) the
x
-axis,
even though it may be placed on the left axis.) This section describes options you can use
to customize the categorical axis. For more details on this, see [ G ] cat axis label options
and [ G ] cat axis line options . We will start by showing how you can change the labels
used for the categorical axis. These examples use the vg past scheme.
graph dot tenure, over(occ7) over(south)
This is an example of a dot plot with
two over() variables graphing the
average tenure broken down by
occupation and whether one lives in the
South. The variable south is a dummy
variable that does not have any value
labels, so the
Prof
Mgmt
Sales
0
Cler.
Operat.
Labor
Other
Prof
x
-axis is not labeled very
Mgmt
Sales
well.
Uses nlsw.dta & scheme vg past
1
Cler.
Operat.
Labor
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.
Search WWH ::




Custom Search