Graphics Reference
In-Depth Information
twoway (rspike high low tradeday)
(line volmil tradeday, sort yaxis(2)),
yscale(range(700 1400) axis(1)) yscale(range(0 10) axis(2))
This example shows the utility of the
yscale(range()) option. The
yscale(range(700 1400) axis(1))
option sets the range of price to be
from 700 to 1400, shifting that series up
to the upper third of the graph. The
yscale(range(0 10) axis(2)) option
sets the range of volume to occupy the
lower third of the graph.
Uses sp2001.dta & scheme vg s2m
0
50
100
150
200
250
Trading day number...
High price/Low price
Volume (millions)
twoway (rspike high low tradeday)
(line volmil tradeday, sort yaxis(2)),
yscale(range(700 1400) axis(1)) yscale(range(0 10) axis(2))
ylabel(1000 1200 1400, axis(1)) ylabel(0 1 2, axis(2))
Because we manipulated the scale of
the
-axes, the labels were pushed
together. We can add the ylabel(1000
1200 1400, axis(1)) and ylabel(0 1
2, axis(2)) options to the previous
example to make the labels for the
y
y
-axes more readable.
Uses sp2001.dta & scheme vg s2m
0
50
100
150
200
250
Trading day number...
High price/Low price
Volume (millions)
8.7
Selecting an axis
This section provides more details about how to select different axes and modify them.
By default, any modifications you make to an axis are applied to the first axis, so you need
to take extra action to modify other axes that you may create. For more information about
these options, see [ G ] axis selection options . For this section, we will use the vg outc
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