Graphics Reference
In-Depth Information
Let's now use the allstates file and consider some examples in which we use the by()
option to display multiple graphs broken down by the location of the state. We will look at
options for placing and aligning text in graphs that use the by() option. This next set of
graphs uses the vg s2c scheme.
scatter ownhome borninstate,
by(nsw, title("% own home" "by % born in state"))
Consider this graph in which we use the
by() option to show this scatterplot
separately for states in the North,
South, and West.
Uses allstates.dta & scheme vg s2c
% own home
by % born in state
North
South
20
40
60
80
West
20
40
60
80
% born in state of residence
Graphs by Region North, South, or West
scatter ownhome borninstate,
by(nsw, title("% own home" "by % born in state",
ring(0) position(5) box ))
Let's put the title in the open hole in
the right corner of the graph using the
ring(0) and position(5) options. We
include the box option only to show the
outline of the textbox, not for
aesthetics.
Uses allstates.dta & scheme vg s2c
North
South
20
40
60
80
West
% own home
by % born in state
20
40
60
80
% born in state of residence
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