colors_legend: Plot a colors legend for geographic ranges

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/BioGeoBEARS_plots_v1.R

Description

Like it says.

Usage

1
2
3
  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

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

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

Matzke_2012_IBS

See Also

legend, floor, ceiling, floor

Examples

1
testval=1

Example output

Loading required package: rexpokit
Loading required package: cladoRcpp
Loading required package: ape
Loading required package: phylobase

Attaching package: 'phylobase'

The following object is masked from 'package:ape':

    edges

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.