Graphics Reference
In-Depth Information
scatter close tradeday, connect( stepstair ) sort
In other contexts, we might want to
connect points using a stepstair
pattern. Here, we connect the observed
closing prices with the stepstair
option to get a stepstair effect.
Uses spjanfeb2001.dta & scheme vg s2c
0
10
20
30
40
Trading day number
scatter close dom, connect(l) sort(date)
Say that we created a variable called
dom that represented the day of month
and wanted to graph the closing prices
for January and February against the
day of the month. Using the
sort(date) option combined with
connect(l) , we almost get what we
want, but we get a line that swoops
back connecting January 31 to Feb 1.
Uses spjanfeb2001.dta & scheme vg s2c
0
10
20
30
Day of month
scatter close dom, connect(L) sort(date)
This kind of example calls for the
connect(L) option, which avoids the
line that swoops back by connecting
points with a straight line, except when
the
x
-value ( dom ) decreases (e.g., goes
from 31 to 1).
Uses spjanfeb2001.dta & scheme vg s2c
0
10
20
30
Day of month
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