Graphics Reference
In-Depth Information
twoway (scatter ownhome urban) (qfit ownhome urban),
by(nsw) legend(position(12) label(2 "Quadratic Fit"))
Here, we add a legend() option, but
the position() option does not seem
to have any effect since it does not
move the position of the legend.
Uses allstatesdc.dta & scheme vg s2c
North
South
40
60
80
100
West
40
60
80
100
Percent urban 1990
% who own home
Quadratic Fit
Graphs by Region North, South, or West
twoway (scatter ownhome urban) (qfit ownhome urban),
by(nsw, legend(position(12)) ) legend(label(2 "Quadratic Fit"))
The graph command from the last
example did not change the position of
the legend because options for
positioning the legend must be placed
within the by() option. Here, we place
the legend(position()) option within
the by() option, and the legend is now
placed above the graph.
Uses allstatesdc.dta & scheme vg s2c
% who own home
Quadratic Fit
North
South
40
60
80
100
West
40
60
80
100
Percent urban 1990
Graphs by Region North, South, or West
twoway (scatter ownhome urban) (qfit ownhome urban), by(nsw, legend(off) )
Likewise, if we wish to turn the legend
off, we must place legend(off) within
the by() option.
Uses allstatesdc.dta & scheme vg s2c
North
South
40
60
80
100
West
40
60
80
100
Percent urban 1990
Graphs by Region North, South, or West
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