legendHist {wrGraph} | R Documentation |
Add histogram to existing plot
Description
Add histogram at pleace of legend using colors from 'colorRamp'.
Usage
legendHist(
x,
colRamp = NULL,
location = "bottomright",
legTit = NULL,
cex = 0.7,
srt = 67,
offS = NULL,
border = TRUE,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
Arguments
x |
(numeric) main input/component of plot |
colRamp |
(character or integer) set of colors, default is rainbow-like |
location |
(character) for location of histogram inside existing plot (may be 'br','bl','tl','tr','bottomright', 'bottomleft','topleft','topright') |
legTit |
(character, length=1) optional title for histogram-insert |
cex |
(numeric) expansion factor (see also |
srt |
(numeric) angle for histogram text labels (90 will give vertical label) (see also |
offS |
( |
border |
(logical) decide of draw gray rectangle or not around legend |
silent |
(logical) suppress messages |
debug |
(logical) display additional messages for debugging |
callFrom |
(character) allow easier tracking of messages produced |
Value
This function produces a histogram on the current plottig device
Examples
dat <- rnorm(90); plot(dat)
legendHist(dat, col=1:5)