Graphics Reference
In-Depth Information
graph matrix urban propval100 borninstate,
maxes( xlabel(0(20)100) ylabel(0(20)100))
Stata has a simpler way of applying the
same labels to all the variables in the
scatterplot matrix by using the maxes()
(multiple axes) option. This example
labels the
0
20
40
60
80
100
100
80
Percent
urban
1990
60
40
20
-axes from 0 to 100
with increments of 20 for all variables.
Uses allstates.dta & scheme vg s2c
x
-and
y
0
100
80
% homes
cost
$100K+
60
40
20
0
100
80
% born in
state of
residence
60
40
20
0
0
20
40
60
80
100
0
20
40
60
80
100
graph matrix urban propval100 borninstate,
maxes(xlabel(0(20)100) ylabel(0(20)100))
xlabel(20(20)100, axis(1)) ylabel(20(20)100, axis(1))
You might want to label most of the
variables in the scatterplot matrix the
same way but with one or more
exceptions in a different way. In this
example, we label all the variables from
0 to 100, incrementing by 20, but then
override the labeling for urban to make
it 20 to 100, incrementing by 20. We do
this by adding additional xlabel() and
ylabel() options that apply just for
axis(1) .
Uses allstates.dta & scheme vg s2c
0
20
40
60
80
100
100
80
Percent
urban
1990
60
40
20
100
80
% homes
cost
$100K+
60
40
20
0
100
80
% born in
state of
residence
60
40
20
0
20
40
60
80
100
0
20
40
60
80
100
graph matrix urban propval100 borninstate,
maxes(xlabel(0(20)100) ylabel(0(20)100) xtick(0(10)100) ytick(0(10)100) )
Here, we label all of the variables from
0 to 100, in increments of 20, and also
add ticks from 0 to 100, in increments
of 10. Note that the xtick() and
ytick() options work the same way as
the xlabel() and ylabel() options.
We place these options within the
maxes() option, and they apply to all
of the axes. See Options : Axis labels
(256) and Options : Axis scales (265) for
more details.
Uses allstates.dta & scheme vg s2c
0
20
40
60
80
100
100
80
Percent
urban
1990
60
40
20
0
100
80
% homes
cost
$100K+
60
40
20
0
100
80
% born in
state of
residence
60
40
20
0
0
20
40
60
80
100
0
20
40
60
80
100
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