Graphics Reference
In-Depth Information
twoway (scatter ownhome urban) (lfit ownhome urban)
(qfit ownhome urban), legend( order(2 3) )
We can also omit keys from the
order() option to suppress their
display in the legend. Here, we suppress
the display of the first key.
Uses allstatesdc.dta & scheme vg s2c
20
40
60
80
100
Percent urban 1990
Fitted values
Fitted values
twoway (scatter ownhome urban) (lfit ownhome urban)
(qfit ownhome urban), legend( order(2 "Lin.
fit" 3 "Quad.
fit" 1) )
You can also insert and replace text for
the keys when using the order()
option. Here, we order the keys 2, 3,
and 1, and at the same time, replace
the text for keys 2 and 3.
Uses allstatesdc.dta & scheme vg s2c
20
40
60
80
100
Percent urban 1990
Lin. fit
Quad. fit
% who own home
twoway (scatter ownhome urban) (lfit ownhome urban)
(qfit ownhome urban),
legend(order( - "Fitted" 2 "Lin.
fit" 3 "Quad.
fit" - "Observed" 1))
We use - "Fitted" to insert the word
Fitted and - "Observed" to insert the
word Observed. Due to the
organization of the keys in the legend,
this is hard to follow.
Uses allstatesdc.dta & scheme vg s2c
20
40
60
80
100
Percent urban 1990
Fitted
Lin. fit
Quad. fit
Observed
% 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.
Search WWH ::




Custom Search