chadd {chplot}R Documentation

Add elements to a chplot

Description

chadd is a function that adds any further elements to a plot produced with the function chplot.

Usage

chadd(param,pos,add.fun,...)

Arguments

param the parameters specifying the plotting regions. As obtained from chplot.
pos the plotting region to which an element is to be added: 1 for the main plot, 2 for top left (marginal distribution plot of the x-variable), 3 for top right (the legend), 4 for bottom right (marginal distribution plot of the y-variable).
add.fun the function to be applied.
... optional parameters to add.fun, separated by commas.

See Also

chplot.

Examples

data(hdr)
# hdr dataset
postscript("file.ps",fonts="mono")         # For screen output, skip this

param<-chplot(age~income|gender,data=hdr,log="x")
# box around the legend region
chadd(param,3,box,"figure")
# tickmark for overall mean in marginal distribution plots
chadd(param,2,lines,c(mean(hdr$income),mean(hdr$income)),c(0,.05))
chadd(param,4,lines,c(0,.025),c(mean(hdr$age),mean(hdr$age)))
dev.off()      # For screen output, skip this

[Package chplot version 1.3.1 Index]