Graphics Reference
In-Depth Information
graph hbar wage, over(grade4) over(union)
Consider this graph, where we show the
mean wages broken down by
grade4
and
union
.Using
graph hbar
displays
the chart as a horizontal bar chart,
which can be useful when you have
many categories to compare.
Uses nlsw.dta & scheme vg s2m
Not HS
HS Grad
nonunion
Some Coll
Coll Grad
Not HS
HS Grad
union
Some Coll
Coll Grad
0
2
4
6
8
10
mean of wage
graph hbar wage, over(grade4,
gap(*3)
) over(union)
We can change the gap between the
levels of
grade4
. Here, we make that
gap three times as large as it normally
would have been. This leads to thinner
bars with a greater gap between them.
Uses nlsw.dta & scheme vg s2m
Not HS
HS Grad
nonunion
Some Coll
Coll Grad
Not HS
HS Grad
union
Some Coll
Coll Grad
0
2
4
6
8
10
mean of wage
graph hbar wage, over(grade4,
gap(*.3)
) over(union)
Here, we shrink the gap between the
levels of
grade4
, making the gaps 30%
of the size they normally would have
been. This leads to wider bars with a
smaller gap between them.
Uses nlsw.dta & scheme vg s2m
Not HS
HS Grad
nonunion
Some Coll
Coll Grad
Not HS
HS Grad
union
Some Coll
Coll Grad
0
2
4
6
8
10
mean of wage
The electronic form of this topic is solely for direct use at UCLA and only by faculty, students, and staff of UCLA.