chadd {chplot} | R Documentation |
chadd
is a function that adds any further elements to a plot
produced with the function chplot
.
chadd(param,pos,add.fun,...)
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 . |
chplot
.
data(hdr) # hdr dataset param<-chplot(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)))