.bestLegendLoc {wrGraph} | R Documentation |
Search best corner of plot for placing for legend This function aims to find best corner for plotting a legend.
Description
Search best corner of plot for placing for legend
This function aims to find best corner for plotting a legend.
Usage
.bestLegendLoc(
dat,
txtLen,
txtHi,
displayPlotSearch = FALSE,
silent = TRUE,
debug = FALSE,
callFrom = NULL
)
Arguments
dat |
(matrix, list or data.frame) main data of plot |
txtLen |
(numeric, length=1) |
txtHi |
(numeric, length=1) text height from graphics::strheight() (including inter-line) |
displayPlotSearch |
(logical) decide if lines to mark area where data is searched for legend should be drawn |
silent |
(logical) suppress messages |
debug |
(logical) additonal messages for debugging |
callFrom |
(character) allows easier tracking of messages produced |
Value
numeric vector with counts of umber of points expected to enter legend-location for each corner (ie legend-localization)
See Also
Examples
dat1 <- matrix(c(1:5,1,1:5,5), ncol=2)
(legLoc <- .bestLegendLoc(dat1, txtLen=0.4, txtHi=28))
[Package wrGraph version 1.3.7 Index]