Graphics Reference
In-Depth Information
twoway (scatter rent700 ownhome )
(scatter propval100 ownhome, yaxis(2) )
Consider this overlaid twoway graph.
The two
-variables are both scaled in
percentages, but they have different
ranges. We use the yaxis(2) option on
the second scatter command to place
that axis on the second
y
-axis, which is
then placed on the right axis.
Uses allstatesdc.dta & scheme vg past
y
55
60
65
70
75
80
% who own home...
% rents $700+/mo
% homes cost $100K+
twoway (scatter rent700 ownhome) (scatter propval100 ownhome, yaxis(2)),
ytitle("Percent rents over $700", axis(1) )
ytitle("Percent homes over $100,000", axis(2) )
Now that we have two
-axes, the
ytitle() option would change the
y
y
-axis, unless we
specify otherwise. In this example, we
supply a ytitle() option with the
axis(1) option to indicate that the
title belongs to the first
-title for the first
y
-axis, and a
second ytitle() option using the
axis(2) option to indicate that the
second title belongs to the second
y
y
55
60
65
70
75
80
% who own home...
% rents $700+/mo
-axis.
Uses allstatesdc.dta & scheme vg past
% homes cost $100K+
8.5
Setting and controlling axis labels
This section describes more details about axis labels, including major and minor (nu-
meric) labels, major and minor tick marks, and grid lines. This section also shows how
to control the appearance of these objects (e.g., size, color, thickness, or angle). For more
information, see [ G ] axis label options . For this section, we will use the vg s1c scheme.
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