Graphics Reference
In-Depth Information
graph hbox prev exp tenure, nooutside over(occ5)
ytitle("Years of experience", size(vlarge) box bexpand )
Because this title is considered to be a
textbox, you can use a variety of
textbox options to control the look of
the title. This example makes the title
very large, surrounds it with a box, and
uses the bexpand (box expand) option
to stretch the box to fill the width of
the plot area. See Options : Textboxes
(303) for additional examples of how to
use textbox options to control the
display of text.
Uses nlsw.dta & scheme vg lgndc
Prof/Mgmt
Sales
Prev. work exper.
Clerical
Curr. work exper.
Labor/Ops
Other
0
5
10
15
20
Years of experience
excludes outside values
graph box wage, nooutside over(occ5) over(collgrad) asyvar
yline(4 12, lwidth(medthick) lcolor(maroon) lpattern(dash))
In this example, we use the yline()
option to add a medium-thick, maroon,
dashed line to the points in the graph
where wages equal 4 and 12. Note that
we would still use yline() ,evenifwe
used graph hbox , placing the
Prof/Mgmt
Sales
y
-axis at
Clerical
the bottom.
Uses nlsw.dta & scheme vg lgndc
Labor/Ops
Other
not college grad
college grad
excludes outside values
graph box wage, nooutside over(occ5) over(collgrad) asyvar
ylabel(5(10)25)
We can use the ylabel() option to
label the
-axis. In this case, we use the
labels going from 5 to 25 by increments
of 10. Note that the
y
Prof/Mgmt
-axis still starts
at 0, and we would have to supply the
exclude0 option, so 0 is not necessarily
the starting point for the
y
Sales
Clerical
-axis. See
Options : Axis labels (256) and
[ G ] axis label options for more
details. Please disregard any references
to xlabel() since that option is not
valid when using graph box .
Uses nlsw.dta & scheme vg lgndc
y
Labor/Ops
Other
not college grad
college grad
excludes outside values
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