Graphics Reference
In-Depth Information
twoway (scatter ownhome urban) (lfit ownhome urban) (qfit ownhome urban),
legend( order(- "Observed" 1 - "Fitted" 2 "Lin.
fit" 3 "Quad.
fit")
rows(3) holes(3) colfirst)
This legend is the same as the one in
the previous example but places the
Observed keys in the left column and
the Fitted keys in the right column. To
do this, we changed the order of the
keys but also added the holes(3)
option so that Fitted would be in the
fourth position at the top of the second
column.
Uses allstatesdc.dta & scheme vg s2c
20
40
60
80
100
Percent urban 1990
Observed
% who own home
Fitted
Lin. fit
Quad. fit
twoway (scatter ownhome urban) (lfit ownhome urban) (qfit ownhome urban),
legend(order(- "Observed" 1 -"" - "Fitted" 2 "Lin fit" 3 "Qd fit")
rows(3) colfirst)
Referring to the last graph, instead of
using holes() , we can put in a blank
key, -"" ,inthe order() option,
which pushes the word Fitted over to
the next column.
Uses allstatesdc.dta & scheme vg s2c
20
40
60
80
100
Percent urban 1990
Observed
% who own home
Fitted
Lin fit
Qd fit
twoway (scatter ownhome urban) (lfit ownhome urban) (qfit ownhome urban),
legend(order(- "Observed" 1 - " " - "Fitted" 2 "Lin fit" 3 "Qd fit")
rows(3) colfirst textfirst )
Using the textfirst option, we can
make the text for the key appear first,
followed by the symbol.
Uses allstatesdc.dta & scheme vg s2c
20
40
60
80
100
Percent urban 1990
Observed
% who own home
Fitted
Lin fit
Qd fit
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