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

bi_theme

Basic Theme for Bivariate Mapping


Description

A theme for creating a simple, clean bivariate map using ggplot2.

Usage

bi_theme(
  base_family = "sans",
  base_size = 24,
  bg_color = "#ffffff",
  font_color = "#000000",
  ...
)

Arguments

base_family

A character string representing the font family to be used in the map.

base_size

A number representing the base size used in the map.

bg_color

A character string containing the hex value for the desired color of the map's background.

font_color

A character string containing the hex value for the desired color of the map's text.

...

Arguments to pass on to ggplot2's theme function

Examples

# load suggested dependencies
library(ggplot2)
library(sf)

# add breaks, 3x3
data <- bi_class(stl_race_income, x = pctWhite, y = medInc, dim = 3)

# create map
ggplot() +
  geom_sf(data = data, aes(fill = bi_class), color = "white", size = 0.1, show.legend = FALSE) +
  bi_scale_fill(pal = "GrPink", dim = 3) +
  bi_theme()

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.