Graphics Reference
In-Depth Information
twoway scatter propval100 faminc
Let's start with a basic graph showing
the percent of homes costing over
$100,000 by the median family income.
Uses allstatesdc.dta & scheme vg s1c
15000
20000
25000
30000
1979 Median Family Inc.
twoway scatter propval100 faminc, xlabel(#10) ylabel(#10)
Using the xlabel(#10) and
ylabel(#10) options, we ask for about
10 values to be labeled on each axis.
Stata chose to use 10 values for the
y
-axis, labeling it from 0 to 90,
incrementing by 10, and 8 values for
the
-axis going from 14,000 to 28,000,
incrementing by 2,000. As you can see
from this example, sometimes Stata
follows your suggestion exactly, and
sometimes it chooses a different number
of values to make more logical labels.
Uses allstatesdc.dta & scheme vg s1c
x
14000
16000
18000
20000
22000
24000
26000
28000
1979 Median Family Inc.
twoway scatter propval100 faminc, ylabel(0(10)100)
We can change the major labels for the
y
-variable to range from 0 to 100,
incrementing by 10, using the
ylabel(0(10)100) option.
Uses allstatesdc.dta & scheme vg s1c
15000
20000
25000
30000
1979 Median Family Inc.
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