Graphics Reference
In-Depth Information
twoway scatter fv ownhome propval100, connect(l .)
sort
Say that we regressed ownhome on
propval100 and generated predicted
values named fv . Here, we make a
scatterplot and fit line in the same
graph using the connect(l .) option
to connect the values of fv but not the
values of ownhome . We also add the
sort option, which is generally
recommended when using the
connect() option. See
Options : Connecting (250) for more
details.
Uses allstates.dta & scheme vg outm
0
20
40
60
80
100
% homes cost $100K+
yhat ownhome|propval100
% who own home
twoway scatter propval100 rent700 ownhome,
xtitle(Percent of households that own their own home)
We can add a title to the
-axis using
the xtitle() option, as illustrated
here. See Options : Axis titles (254) for
more details about titles.
Uses allstates.dta & scheme vg outm
x
40
50
60
70
80
Percent of households that own their own home
% homes cost $100K+
% rents $700+/mo
twoway scatter propval100 rent700 ownhome, ylabel(0(10)100)
y
We can label the
-axis from 0 to 100,
incrementing by 10, using the
ylabel(0(10)100) option as shown
here. See Options : Axis labels (256) for
more information about labeling axes.
Uses allstates.dta & scheme vg outm
40
50
60
70
80
% who own home
% homes cost $100K+
% rents $700+/mo
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