Graphics Reference
In-Depth Information
We will now briefly consider some other options that can be used with twoway histogram ,
showing how you can swap the position of the
-axes, and the discrete option for
use with discrete variables. We will use the vg s1m scheme for the next set of graphs.
x
-and
y
twoway histogram ttl exp, horizontal
We can use the horizontal option to
swap the position of ttl exp and its
density, making a horizontal display of
the histogram.
Uses nlsw.dta & scheme vg s1m
0
.02
.04
.06
.08
.1
Density
twoway histogram grade, discrete
Here, we use the discrete option to
tell Stata that the variable grade is a
discrete variable and can take on only
integer values. In this example, each
bin has a width of 1, and the bars are
toonarrowtobeuseful.
Uses nlsw.dta & scheme vg s1m
5
10
15
20
current grade completed
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