Maps macroevolutionary rates to a set of NCOLORS
.
1 2  assignColorBreaks(rates, NCOLORS = 64, spex = "s", logcolor = FALSE,
method = c("linear", "quantile", "jenks"), JenksSubset = NULL)

rates 
A numeric vector of phenotypic rates or a list of numeric vectors of speciation and extinction rates. 
NCOLORS 
An integer number of colors to use for the mapping. Larger numbers do not necessarily result in smoother looking color ramps. The default is 64 and is probably sufficient for most purposes. 
spex 
A character string. "s" means that speciation rates are used
to make the map, "e" means that extinction rates are used. "netdiv"
means that diversification rates are used. Ignored for 
logcolor 
Logical. Should the natural logarithm of rates be used for the color map. 
method 
Determines how the color breaks are created. See Details. 
JenksSubset 
Number of regularly spaced samples to subset from

If method = "quantile"
macroevolutionary rates are binned
into NCOLORS+1
percentiles and rates in each bin are mapped to
a color determined by the pal
argument in plot.bammdata
.
Alternatively, if method = "linear"
macroevolutionary rates are
binned into NCOLORS+1
equal length intervals between the
minimum and maximum.
If method = "jenks"
, macroevolutionary rates are binned into
NCOLORS+1
categories, according to the Jenks natural breaks
classification method. This method is borrowed from the field of
cartography, and seeks to minimize the variance within categories,
while maximizing the variance between categories.
The Jenks natural breaks method was ported to C from code found in the classInt R package.
A numeric vector of rate percentiles/intervals.
Mike Grundler, Pascal Title
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  data(whales, events.whales)
ed < getEventData(whales, events.whales, burnin = 0.2, nsamples = 500)
ed < dtRates(ed, 0.01)
colors < assignColorBreaks(ed$dtrates$rates, spex="s") #speciation rates
#colors < assignColorBreaks(ed$dtrates$rates[[1]])
#this also works for speciation rates
plot(ed, colorbreaks = colors, spex="s")
colors < assignColorBreaks(ed$dtrates$rates, spex="netdiv")
#diversification rates
#colors < assignColorBreaks(ed$dtrates$rates[[1]]  ed$dtrates$rates[[2]])
#this also works for diversification rates
plot(ed, colorbreaks = colors, spex="netdiv")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.