Graphics Reference
In-Depth Information
4
Bar graphs
This chapter will explore how to create bar charts using the graph bar command. It
will show how you can use graph bar to graph one or more continuous
-variables and how
you can break them down by one or more categorical variables. In addition, this chapter
will illustrate how you can control the display of each of the axes, the legend, and the look of
the bars, and how to use the by() option. We will start this chapter by looking at features
related to graphing one or more
y
y
-variables. For this entire chapter, we will use the nlsw
data file.
4.1
Y-variables
A bar chart graphs one or more continuous variables broken down by one or more cat-
egorical variables. The continuous variables are graphed on the
y
-axis and are referred to
as
y
-variables. This section shows you how to specify the
y
-variables using the graph bar
command, how to include one or more
y
-variables, and how to obtain different summary
statistics for the
-variables. For more information, see [ G ] graph bar . This section begins
using the vg past scheme.
y
graph bar ttl exp
This is probably the most basic bar
chart that you can make (and perhaps
the most boring, as well). It shows the
average total work experience for all
observations in the file. It graphs a
single
-variable using the default
summary statistic, the mean.
Uses nlsw.dta & scheme vg past
y
107
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