Description Usage Arguments Examples
A ggplot2-based tabularmap that places a coordinated dataset in a rectangle.
1 2 3 4 5 6 7 8 9 10 11 |
data |
data.frame. Contain x, y, group and label variables used as coordinates. |
x, y |
A column containing the numbers to line up the items. |
group |
Group variable. |
fill |
Fill colour variable. |
label |
Label variable. |
... |
All other arguments passed on to |
.expand_size |
The value specified in the |
.radius_size |
The value specified in the |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library(ggplot2)
tabularmap(jpn77, x, y, group = jis_code, label = prefecture, size = 3)
tabularmap(jpn77, x, y, group = jis_code, fill = region, label = prefecture, size = 3) +
theme_tabularmap() +
scale_fill_jpregion(lang = "en")
tabularmap(data.frame(
id = letters[seq.int(9)],
x = rep(c(1,2,3), each = 3),
y = rep(c(1,2,3), times = 3),
fill = seq.int(9),
label = letters[seq.int(9)]),
x, y,
group = id,
fill = fill,
label = label,
.expand_size = 20, .radius_size = 10)
tabularmap(iso3166, x, y, group = iso2c,
fill = continent,
label = iso2c,
.expand_size = 5) +
theme_tabularmap() +
guides(fill = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.