
Last chance! 50% off unlimited learning
Sale ends in
colPoints
colPointsLegend(z, Range=range(z, finite=TRUE), nbins=40,
colors=rainbow2(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, ...)
colPoints
, can be matrix, vector, etc, but must be numericrainbow
from blue (lowest) to red (highest value in Range)at
. DEFAULT: atsmallPlot
. DEFAULT: 60,99smallPlot
in relative values (0:100). DEFAULT: internal calculations based on title, labelpos and titlepos.par
, but with different defaults. DEFAULT: c(1.8, 0.6, 0)density
. DEFAULT: NULLat
? DEFAULT: TRUEat
? DEFAULT: FALSEx1,x2,y1,y2,labelpos,titlepos,title
have different defaults when horizontal=FALSE
.colPoints
(section examples) for real life examplez <- rnorm(50)
plot(1:10)
colPointsLegend(z=z)
colPointsLegend(z=z, titlepos=2)
colPointsLegend(z=z, horiz=FALSE) # note the different defaults
# positioning relative to plot:
colPointsLegend(z=z, x1=5, x2=30, y1=90, y2=70, title="Booh!", density=FALSE)
# Denote values outside of Range wit a triangle:
colPointsLegend(z=z, Range=c(-1,3), x1=20, y1=60, y2=40, triangle=c(0,0.5))
colPointsLegend(z=z, horiz=FALSE, x1=70, y1=60, plottriangle=TRUE, density=FALSE)
?colPoints # example section for actual usage
Run the code above in your browser using DataLab