Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bi_legend

Create Object for Drawing Legend


Description

Creates a ggplot object containing a legend that is specific to bivariate mapping.

Usage

bi_legend(pal, dim = 3, xlab, ylab, size)

Arguments

pal

A palette name; one of "Brown", "DkBlue", "DkCyan", "DkViolet", or "GrPink".

dim

The dimensions of the palette, either 2 for a two-by-two palette or 3 for a three-by-three palette.

xlab

Text for desired x axis label on legend

ylab

Text for desired y axis label on legend

size

Size of axis labels

Value

A ggplot object with a bivariate legend.

Examples

# construct 2x2 legend
legend <- bi_legend(pal = "GrPink",
                    dim = 2,
                    xlab = "Higher % White ",
                    ylab = "Higher Income ",
                    size = 16)

# print legend
legend

# construct 3x3 legend
legend <- bi_legend(pal = "GrPink",
                    dim = 3,
                    xlab = "Higher % White ",
                    ylab = "Higher Income ",
                    size = 16)

# print legend
legend

biscale

Tools and Palettes for Bivariate Thematic Mapping

v0.2.0
GPL-3
Authors
Christopher Prener [aut, cre] (<https://orcid.org/0000-0002-4310-9888>), Timo Grossenbacher [aut], Angelo Zehr [aut], Joshua Stevens [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.