Graphics Reference
In-Depth Information
twoway (scatter ownhome urban) (lfit ownhome urban)
(qfit ownhome urban),
legend(label(2 "Lin.
Fit") label(3 "Quad.
Fit")
)
You can use the
label()
option to
modify just some of the keys; for
example, here we just modify the
second and third key.
Uses allstatesdc.dta & scheme vg s2c
20
40
60
80
100
Percent urban 1990
% who own home
Lin. Fit
Quad. Fit
twoway (scatter ownhome urban) (lfit ownhome urban)
(qfit ownhome urban),
legend(label(1
"%own" "home"
) label(2
"Lin" "Fit"
) label(3
"Qd" "Fit"
))
You can put the label on multiple lines
by including multiple quoted strings.
Uses allstatesdc.dta & scheme vg s2c
20
40
60
80
100
Percent urban 1990
%own
home
Lin
Fit
Qd
Fit
twoway (scatter ownhome urban) (lfit ownhome urban)
(qfit ownhome urban), legend(
order(2 3 1)
)
You can use the
order()
option to
change the order of the keys in the
legend.
Uses allstatesdc.dta & scheme vg s2c
20
40
60
80
100
Percent urban 1990
Fitted values
Fitted values
% who own home
The electronic form of this topic is solely for direct use at UCLA and only by faculty, students, and staff of UCLA.