Add data labels.
add_labels( p, label.color = "#000", line.width = 1, font.size = 10, font.family = "Verdana", ... )
p | a datamaps object. |
---|---|
label.color | label color. |
line.width | width of line. |
font.size | font size. |
font.family | font family. |
... | any other parameter. |
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")