Graphics Reference
In-Depth Information
While the previous examples (and other examples in this topic) have used the parenthet-
ical notation for overlaid graphs, Stata also permits double vertical bars (
||
) for separating
graphs. To illustrate this, some of the graphs from above will be repeated using this nota-
tion. These examples will be shown using the
vg s2m
scheme.
twoway scatter propval100 urban
||
lfit propval100 urban
We switch back to the
allstates
data
file. Here, the
||
notation is used to
separate the
scatter
command from
the
lfit
command.
Uses allstates.dta & scheme vg s2m
20
40
60
80
100
Percent urban 1990
% homes cost $100K+
Fitted values
twoway scatter propval100 urban
||
lfit propval100 urban
||
qfit propval100 urban
Here, we create three overlaid graphs
using the
||
notation.
Uses allstates.dta & scheme vg s2m
20
40
60
80
100
Percent urban 1990
% homes cost $100K+
Fitted values
Fitted values
The electronic form of this topic is solely for direct use at UCLA and only by faculty, students, and staff of UCLA.