sl.num2colbarbreaks | R Documentation |
Automatically define a discrete number of breaks given a numerical vector or matrix for application with a discrete colourbar.
sl.num2colbarbreaks(num, colbar = NULL, Nbreaks = NULL, breaks.log = FALSE)
num |
a numerical vector or matrix. |
colbar |
a spheRlab colourbar of length |
Nbreaks |
an integer giving the number of breaks to be generated. Note that |
breaks.log |
a logical value indicating whether the breaks shall be placed in logarithmic steps. Default is |
This function is used by sl.num2colbar
.
A vector of length N-1
giving the breaks.
Helge Goessling
sl.num2colbar
cb = sl.colbar(cols=list(c(1,0,0),c(.5,.5,.5),c(0,0,1)),N=5)
sl.num2colbarbreaks(num=runif(n=1000,min=-5,max=5),colbar=cb)
## Should return something like (result subject to randomness):
## [1] -3.0019879 -1.0079374 0.9861131 2.9801636
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.