Usage
colPointsLegend(z, Range = range(z, finite = TRUE), nbins = 40, colors = seqPal(nbins), bb = seqR(Range, length.out = nbins + 1), at = pretty2(Range), labels = at, adj = 0.5, bg = "white", x1 = 60, y1 = 99, x2 = x1 + 38, y2 = y1 - 11, mar, mgp = c(1.8, 0.6, 0), sborder = NA, resetfocus = TRUE, plottriangle = FALSE, triangle = 0.14, tricol = c(1, 8), density = NULL, lines = TRUE, atminmax = FALSE, horizontal = TRUE, labelpos = 1, titlepos = 3, title = "Legend", las = 1, ...)
Arguments
z
Values of third dimension used in colPoints
, can be matrix, vector, etc, but must be numeric Range
Ends of color bar for method=equalinterval. DEFAULT: range(z, finite=TRUE)
nbins
Number of classes (thus, colors). DEFAULT: 40
colors
Color vector. DEFAULT: rainbow
from blue (lowest) to red (highest value in Range) bb
Borders of bins for the legend (key). DEFAULT: seqR(Range, length.out=nbins+1)
at
Positions of legend labels. DEFAULT: pretty2(Range)
labels
Labels that are written at the positions of at
. DEFAULT: at
adj
label adjustment parallel to legend bar (only one number!). DEFAULT: 0.5
bg
Background behind key, labels and title. DEFAULT: "white"
x1, y1
Topleft relative coordinates (0:100) of inset plot, see smallPlot
. DEFAULT: 60,99 x2, y2
Bottomright -"-. DEFAULT: 98,88
mar
Margins for smallPlot
in relative values (0:100). DEFAULT: internal calculations based on title, labelpos and titlepos. mgp
MarGinPlacement: distance of xlab/ylab, numbers and line from plot margin, as in par
, but with different defaults. DEFAULT: c(1.8, 0.6, 0) sborder
Border around inset subplot. DEFAULT: NA
resetfocus
Reset focus to original plot? Specifies where further low level plot commands are directed to. DEFAULT: TRUE
plottriangle
Should triangles be plotted at the end of the legend for values outside Range? TRUE if missing but triangle is given. DEFAULT: FALSE
triangle
Percentage of bar length at lower and upper end for triangles (can be a vector with two different values). DEFAULT: 0.14
tricol
Triangle colors for lower and upper end. DEFAULT: c(1,8)
density
Plot kernel density line? arguments passed to density
. DEFAULT: NULL lines
Plot black lines in the color bar at at
? DEFAULT: TRUE
atminmax
Should the extrema of the legend be added to at
? DEFAULT: FALSE
horizontal
Horizontal bar? if FALSE, a vertical bar is drawn. DEFAULT: TRUE
labelpos
Position of labels relative to the bar. Possible: 1 (below), 2 (left), 3 (above), 4 (right), 5(on top of bar). DEFAULT: 1
titlepos
Position of title -"-. DEFAULT: 3
title
Legend title. DEFAULT: "Legend"
las
LabelAxisStyle. DEFAULT: 1
...
Further arguments passed to text
and strwidth
, e.g. cex, srt, font, col. But NOT adj!