Graphics Reference
In-Depth Information
twoway scatter educ popden,
xscale(log)
We briefly return to the
allstates
file
to illustrate the
xscale(log)
option.
The
xscale(log)
option indicates that
the
-axis should be displayed on a log
scale. Note that the labels for the
x
x
-axis overlap each other.
Uses allstates.dta & scheme vg s2m
2000
4006008000
10000
Pop/10 sq. miles
twoway scatter educ popden, xscale(log)
xlabel(1 10 100 1000 10000)
Here, we use the
xlabel()
option to
change the labels for the
-axis using
the values 1, 10, 100, 1000, and 10,000,
and you can see how these powers of 10
are more equally spaced, reflecting the
log scale of the
x
-axis.
Uses allstates.dta & scheme vg s2m
x
1
10
100
1000
10000
Pop/10 sq. miles
twoway rspike high low tradeday,
xscale(lwidth(thick))
We now return to the
sp2001
data.
You can use the
xscale()
and
yscale()
options to control the axis
lines. In this example, we make the
x
-axis line thick by specifying
xscale(lwidth(thick))
.
Uses sp2001.dta & scheme vg s2m
0
50
100
150
200
250
Trading day number
The electronic form of this topic is solely for direct use at UCLA and only by faculty, students, and staff of UCLA.