add_labels: Add labels

Description Usage Arguments Examples

View source: R/opts.R

Description

Add data labels.

Usage

1
2
3
4
5
6
7
8
add_labels(
  p,
  label.color = "#000",
  line.width = 1,
  font.size = 10,
  font.family = "Verdana",
  ...
)

Arguments

p

a datamaps object.

label.color

label color.

line.width

width of line.

font.size

font size.

font.family

font family.

...

any other parameter.

Examples

1
2
3
4
5
6
7
states <- data.frame(st = c("AR", "NY", "CA", "IL", "CO", "MT", "TX"),
    val = c(10, 5, 3, 8, 6, 7, 2))

states %>%
    datamaps("usa") %>%
    add_choropleth(st, val) %>%
    add_labels(label.color = "blue")

JohnCoene/datamaps documentation built on Aug. 30, 2020, 7:20 a.m.