Learn R Programming

BioGeoBEARS (version 0.2.1)

colors_legend: Plot a colors legend for geographic ranges

Description

Like it says.

Usage

colors_legend(possible_ranges_list_txt, colors_list_for_states, legend_ncol = NULL, legend_cex = 1)

Arguments

possible_ranges_list_txt
A list of the allowed ranges/states
colors_list_for_states
The corresponding colors
legend_ncol
The number of columns in the legend. If NULL (default), the function calculates floor(sqrt(length(possible_ranges_list_txt) / 2)). Note that when you have hundreds of states, there is probably no good way to have a coherent legend, and it is easier to just rely upon printing the character codes for the ML states in the plots, with the colors, and users can then see and trace the common colors/states by eye.
legend_cex
The cex (character expansion size) for the legend. Defaults to 1, which means the legend function determines the size. The value 2.5 works well for 15 or 16 states/ranges.

Value

Nothing

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster

Matzke_2012_IBS

See Also

legend, floor, ceiling, floor

Examples

Run this code
testval=1

Run the code above in your browser using DataLab