stockplot: Stock Plot

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/ares.r

Description

Produce a stock type plot

Usage

1
2
stockplot(mid, low, high, ref.line = NULL, xlabels = seq(1:length(mid)), ticks = 20,
	mid.pch = 19, lim.pch = 15, graph.scale = NULL, ylim = NULL, ...)

Arguments

mid

a vector of mid points for the bars, usually mean values

low

a vector of low points for the bars, usually minimum values

high

a vector of high points for the bars, usually maximum values

ref.line

the position on the y-axis to draw a horizontal line. If is set to NULL no line is drawn. Default is NULL

xlabels

a vector of alternate labels for the bars

ticks

an integer indicating the number of tick marks. Default is 20

mid.pch

a number or character indicating the symbol to be used for mid points. Default is a filled circle

lim.pch

a number or character indicating the symbol to be used for end points. Default is a filled square

graph.scale

can be either a logical or a vector with the axis limits. If TRUE or a vector all the graphs will share the same y-axis scale

ylim

limits for the y-axis scale. If omitted it is computed from values

...

further options for plot

Details

This function implements a stock type plot. Often used to represent stock prices closure, it can indicate the average value at the centre of a bar and minimum and maximum values at the ends of the bar. This plot is very useful to represent statistics and their confidence intervals in a convenient way.

This function is used by plot_risk.

Value

This function does not return a value.

Author(s)

Washington Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br

See Also

plot

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
data(admrio)
setup(admrio,"date")
m <- c(mean(resp5),mean(resp65))
l <- c(min(resp5),min(resp65))
h <- c(max(resp5),max(resp65))
stockplot(m,l,h,xlabels=c("Resp 5","Resp 65"),xlab="Outcome",ylab="Counts")

## End(Not run)

wjunger/ares documentation built on Dec. 23, 2021, 5:17 p.m.