Map macroevolutionary rates to colors
Maps macroevolutionary rates to a set of
A numeric vector of phenotypic rates or a list of numeric vectors of speciation and extinction rates.
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.
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
Logical. Should the natural logarithm of rates be used for the color map.
Determines how the color breaks are created. See Details.
Number of regularly spaced samples to subset from
method = "quantile" macroevolutionary rates are binned
NCOLORS+1 percentiles and rates in each bin are mapped to
a color determined by the
pal argument in
method = "linear" macroevolutionary rates are
NCOLORS+1 equal length intervals between the
minimum and maximum.
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[]) #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[] - ed$dtrates$rates[]) #this also works for diversification rates plot(ed, colorbreaks = colors, spex="netdiv")