hloc.render(x, hloc, high=NULL, low=NULL, open=NULL, close=NULL, style="l", x.scale=NULL, y.scale=NULL, width=0.01, col=<<see below>>, lwd=1, lty=1) stackbar.render(x, y, cum=F, x.scale = NULL, y.scale = NULL, width = 0.01, x.width, lwd=1, lty=1, line.col=fill.col, fill.col=<<see below>>, density=-1, angle=45) lines.render(x, y, type="l", x.scale = NULL, y.scale = NULL, lty=<<see below>>, col=<<see below>>, lwd=<<see below>>, pch=<<see below>>, font=<<see below>>, cex=<<see below>>)
"high"
,
"low"
,
"open"
, and
"close"
,
which will override values given in
high
,
low
,
open
, and
close
if given.
style="l"
.
style="l"
.
style="c"
.
style="c"
.
"c"
for so-called "candlesticks",
which have vertical lines
running from low to high, broken by a rectangular box from open to
close. The rectangular box is filled if close is lower than open, and
unfilled if open is lower than close.
"l"
for vertical lines
running from low to high, with a tick
mark to the left for open and to the right for close.
NULL
if the
x
coordinates
are in what
plot
considers to be the user coordinates for the plot.
If the coordinates are given as calendar times or in user coordinates
which are piecewise-linear transformations of
plot
coordinates, then
scale
is a 2-element list
where the first element is a monotonic sequence in user-coordinates giving
the endpoints of the linear regions, and the second element is the
plot
coordinates of those points. Points which lie outside the
scale region will be moved to the ends and a warning will generated.
x.scale
.
hloc.render
),
or of the bars (for
stackbar.render
) as a fraction
of the minimum of the length and width of the plot.
par
. For
lines.render
this can also be
a vector of colors for each set of lines or points. Default
comes from
trellis.par.get("plot.line")
for
hloc.render
.
For
lines.render
, default value comes from
trellis.par.get("superpose.line")
unless
type="p"
, in
which case it comes from
trellis.par.get("superpose.symbol")
.
width
argument if present.
par
;
this can also be
a vector giving the line width for each level of bar or plotting
line.
For
lines.render
, default value comes from
trellis.par.get("superpose.line")
.
par
;
this can also be a
vector giving the line type for each level of bar or each line.
For
lines.render
, default value comes from
trellis.par.get("superpose.line")
.
par("col")
; this can also be
a vector giving the line color for each level of bar.
par("col")
; this can also be
a vector giving the fill color for each level of bar. Default
comes from
trellis.par.get("pie.fill")
.
"p"
,
"l"
,
"b"
,
"o"
,
"n"
,
"s"
, and
"h"
produce points, lines, both, both (overlaid),
nothing, stairsteps, and high-density lines, respectively.
This can also be a vector giving the type for each set of
y
coordinates.
par
; this can also be a vector giving
the plotting character for each set of
y
coordinates.
For
lines.render
, default value comes from
trellis.par.get("superpose.symbol")
.
par
; this can also be a vector giving
the character expansion for each set of
y
coordinates.
For
lines.render
, default value comes from
trellis.par.get("superpose.symbol")
.
par
; this can also be a vector giving
the character font for each set of
y
coordinates.
For
lines.render
, default value comes from
trellis.par.get("superpose.symbol")
.
These low-level plotting functions are similar to the
lines
or
points
functions, but they allow other types of plot indicators
and include scaling.
See the chapter "Creating Plots" in the S-PLUS User's Guide for a more detailed description of candlestick plots.
mydata <- list(x = 1:10, high = 15:24, low = 11:20, open = 12:21, close = 14:23) yinit <- mydata$low; yinit[10] <- 24 plot(mydata$x, yinit, type = "n") hloc.render(mydata$x, high=mydata$high, low=mydata$low, open=mydata$open, close=mydata$close) plot(mydata$x, yinit, type = "n") stackbar.render(mydata$x, data.frame(mydata$low, mydata$high), cum=T) lines.render(mydata$x, mydata$low)