# `grim_plot_grid()` reads the number of decimal places
# from the `digits_x` column:
pigs1 |>
grim_map(digits_x = 2, items_averaged = 1, data_type = "integer") |>
grim_plot_grid()
# The raster follows the rounding method of the `grim_map()` call:
pigs1 |>
grim_map(
digits_x = 2,
items_averaged = 1,
data_type = "integer",
rounding = "ceiling"
) |>
grim_plot_grid()
# Percentages are plotted as proportions:
pigs2 |>
grim_map(
digits_x = 1,
items_averaged = 1,
data_type = "integer",
x_meaning = "percentage"
) |>
grim_plot_grid()
# Other colors for the value sets:
pigs1 |>
grim_map(digits_x = 2, items_averaged = 1, data_type = "integer") |>
grim_plot_grid() +
ggplot2::scale_colour_manual(
values = c("TRUE" = "#2f7d74", "FALSE" = "#c1522e"),
aesthetics = c("colour", "fill"),
guide = "none"
)
Run the code above in your browser using DataLab