Graphics Reference
In-Depth Information
twoway (scatter ownhome borninstate) (lfit ownhome borninstate)
(lfit ownhome borninstate if stateab !="DC",
text(45 70 "Coef with DC .16" "Coef without DC .44", box))
Consider this graph, which uses the
text() option to place an annotation
in the middle of the plot region. The
text might look better if we increased
the margin around the text.
Uses allstatesn.dta & scheme vg rose
80
70
60
50
Coef with DC .16
Coef without DC .44
40
40
50
60
70
80
% born in state of residence
% who own home
Fitted values
Fitted values
twoway (scatter ownhome borninstate) (lfit ownhome borninstate)
(lfit ownhome borninstate if stateab !="DC",
text(45 70 "Coef with DC .16" "Coef without DC .44", box margin(medium) ))
We can expand the margin between the
text and the box with the margin()
option. Note the difference between this
and the bmargin() option (illustrated
previously), which increased the margin
around the outside of the box.
Uses allstatesn.dta & scheme vg rose
80
70
60
50
Coef with DC .16
Coef without DC .44
40
40
50
60
70
80
% born in state of residence
% who own home
Fitted values
Fitted values
twoway (scatter ownhome borninstate) (lfit ownhome borninstate)
(lfit ownhome borninstate if stateab !="DC",
text(45 70 "Coef with DC .16" "Coef w/out DC .44", box margin(5 5 2 2) ))
As with the bmargin() option, we can
more precisely modify the margin
around the text. Here, we use the
margin() option to make the size of the
margin 5, 5, 2, and 2 for the left, right,
top, and bottom, respectively.
Uses allstatesn.dta & scheme vg rose
80
70
60
50
Coef with DC .16
Coef w/out DC .44
40
40
50
60
70
80
% born in state of residence
% who own home
Fitted values
Fitted 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