Graphics Reference
In-Depth Information
6
Dot plots
This chapter discusses the use of dot plots in Stata. We start by showing how you can
specify multiple
-variables to display plots for multiple variables and how you can use the
over() option to break dot plots down by categorical variables. Then, we discuss over()
options that can be used to customize the display of these categorical variables, followed by
options concerning the display of display of categorical axes. Next, we cover options that
control legends, followed by options that control the
y
-axis. Finally, we discuss options that
control the look of the lines and dots that form the dot plot and, lastly, the by() option.
y
6.1
Specifying variables and groups, yvars and over
This section introduces the use of dot plots. It shows how you can use the over()
option for displaying dot plots by one or more grouping variables. It then shows how you
can specify one or more
y
-variables in a plot and control the summary statistic used for
collapsing the
-variable(s). See the group options table in [ G ] graph dot for more details.
The graphs in this section begin using the vg s1c scheme.
y
graph dot tenure, over(occ7)
Here, we use the over() option to show
the average current work experience
broken down by occupation. By
default, the
Prof
Mgmt
-variable ( tenure )is
placed on the bottom axis and is
considered to be the
y
Sales
-axis. Likewise,
the levels of occ7 are placed on the left
axis and are considered to form the
x
y
Cler.
Operat.
Labor
-axis, or categorical axis.
Uses nlsw.dta & scheme vg s1c
Other
0
2
4
6
8
mean of tenure
193
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