Graphics Reference
In-Depth Information
twoway (rarea high low date) (spike volmil date)
We now switch to the sp2001ts data
file. Here, we overlay the high and low
closing prices with the volume of shares
sold. But, since both are placed on the
same
1500
1000
-axis, it is dicult to see the
spikes of volmil , volume in millions.
Uses sp2001ts.dta & scheme vg teal
y
500
0
1Jan01
1Apr01
1Jul01
1Oct01
1Jan02
Date
High price/Low price
Volume (millions)
twoway (rarea high low date) (spike volmil date, yaxis(2) ),
legend(span)
By placing volmil on the second
-axis
using the yaxis(2) option, we can now
see the volume, but it obstructs the
stock prices. Note that we added the
option legend(span) to allow the
legend to be wider than the plot region
of the graph.
Uses sp2001ts.dta & scheme vg teal
y
1400
2.5
1300
2
1200
1.5
1100
1
1000
.5
900
1Jan01
1Apr01
1Jul01
1Oct01
1Jan02
Date...
High price/Low price
Volume (millions)
twoway (rarea high low date) (spike volmil date, yaxis(2)),
legend(span) yscale(range(500 1400) axis(1)) yscale(range(0 5) axis(2))
We use the yscale() option to modify
the range for the first
1400
-axis to lift its
range into the top third of the graph,
and another yscale() option to modify
the range for the second
y
1300
1200
1100
-axis, pushing
the stock market volume down to the
bottom third.
Uses sp2001ts.dta & scheme vg teal
y
1000
2.5
900
2
1.5
1
.5
1Jan01
1Apr01
1Jul01
1Oct01
1Jan02
Date...
High price/Low price
Volume (millions)
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