Opinionated ggplot2 theme to visualize NLM raster.
theme_nlm(base_family = NA, base_size = 11.5,
plot_title_family = base_family, plot_title_size = 18,
plot_title_face = "bold", plot_title_margin = 10,
subtitle_family = NA, subtitle_size = 13, subtitle_face = "plain",
subtitle_margin = 15, strip_text_family = base_family,
strip_text_size = 12, strip_text_face = "plain",
strip.background = "grey80", caption_family = NA, caption_size = 9,
caption_face = "plain", caption_margin = 10,
axis_text_size = base_size, axis_title_family = base_family,
axis_title_size = 9, axis_title_face = "plain",
axis_title_just = "rt", plot_margin = ggplot2::unit(c(0, 0, 0, 0),
"lines"), grid_col = "#cccccc", grid = TRUE, axis_col = "#cccccc",
axis = FALSE, ticks = FALSE, legend_title = "Z",
legend_labels = NULL, legend_text_size = 8, legend_title_size = 10,
ratio = 1, viridis_scale = "D", ...)theme_nlm_discrete(base_family = NA, base_size = 11.5,
plot_title_family = base_family, plot_title_size = 18,
plot_title_face = "bold", plot_title_margin = 10,
subtitle_family = NA, subtitle_size = 13, subtitle_face = "plain",
subtitle_margin = 15, strip_text_family = base_family,
strip_text_size = 12, strip_text_face = "plain",
strip.background = "grey80", caption_family = NA, caption_size = 9,
caption_face = "plain", caption_margin = 10,
axis_text_size = base_size, axis_title_family = base_family,
axis_title_size = 9, axis_title_face = "plain",
axis_title_just = "rt", plot_margin = ggplot2::unit(c(0, 0, 0, 0),
"lines"), grid_col = "#cccccc", grid = TRUE, axis_col = "#cccccc",
axis = FALSE, ticks = FALSE, legend_title = "Z",
legend_labels = NULL, legend_text_size = 8, legend_title_size = 10,
ratio = 1, viridis_scale = "D", ...)
theme_nlm_grey(base_family = NA, base_size = 11.5,
plot_title_family = base_family, plot_title_size = 18,
plot_title_face = "bold", plot_title_margin = 10,
subtitle_family = NA, subtitle_size = 13, subtitle_face = "plain",
subtitle_margin = 15, strip_text_family = base_family,
strip_text_size = 12, strip_text_face = "plain",
strip.background = "grey80", caption_family = NA, caption_size = 9,
caption_face = "plain", caption_margin = 10,
axis_text_size = base_size, axis_title_family = base_family,
axis_title_size = 9, axis_title_face = "plain",
axis_title_just = "rt", plot_margin = ggplot2::unit(c(0, 0, 0, 0),
"lines"), grid_col = "#cccccc", grid = TRUE, axis_col = "#cccccc",
axis = FALSE, ticks = FALSE, legend_title = "Z",
legend_labels = NULL, legend_text_size = 8, legend_title_size = 10,
ratio = 1, ...)
theme_nlm_grey_discrete(base_family = NA, base_size = 11.5,
plot_title_family = base_family, plot_title_size = 18,
plot_title_face = "bold", plot_title_margin = 10,
subtitle_family = NA, subtitle_size = 13, subtitle_face = "plain",
subtitle_margin = 15, strip_text_family = base_family,
strip_text_size = 12, strip_text_face = "plain",
strip.background = "grey80", caption_family = NA, caption_size = 9,
caption_face = "plain", caption_margin = 10,
axis_text_size = base_size, axis_title_family = base_family,
axis_title_size = 9, axis_title_face = "plain",
axis_title_just = "rt", plot_margin = ggplot2::unit(c(0, 0, 0, 0),
"lines"), grid_col = "#cccccc", grid = TRUE, axis_col = "#cccccc",
axis = FALSE, ticks = FALSE, legend_title = "Z",
legend_labels = NULL, legend_text_size = 8, legend_title_size = 10,
ratio = 1, ...)
theme_facetplot(base_family = NA, base_size = 11.5,
plot_title_family = base_family, plot_title_size = 18,
plot_title_face = "bold", plot_title_margin = 10,
subtitle_family = NA, subtitle_size = 13, subtitle_face = "plain",
subtitle_margin = 15, strip.background = "grey80",
caption_family = NA, caption_size = 9, caption_face = "plain",
caption_margin = 10, ratio = 1, viridis_scale = "D", ...)
theme_facetplot_discrete(base_family = NA, base_size = 11.5,
plot_title_family = base_family, plot_title_size = 18,
plot_title_face = "bold", plot_title_margin = 10,
subtitle_family = NA, subtitle_size = 13, subtitle_face = "plain",
subtitle_margin = 15, strip.background = "grey80",
caption_family = NA, caption_size = 9, caption_face = "plain",
caption_margin = 10, ratio = 1, viridis_scale = "D", ...)
base font family size
base font size
plot title family
plot title size
plot title face
plot title ggplot2::margin
plot subtitle family
plot subtitle size
plot subtitle face
plot subtitle ggplot2::margin bottom (single numeric value)
facet facet label font family
facet label font family, face and size
facet facet label font face
strip background
plot caption family
plot caption size
plot caption face
plot caption ggplot2::margin
axis text size
axis title family
axis title size
axis title face
axis title justification
plot ggplot2::margin (specify with `ggplot2::margin``)
grid color
grid TRUE/FALSE
axis color
axis TRUE/FALSE
ticks TRUE/FALSE
Title of the legend (default "Z"
)
Labels for the legend ticks, if
used with show_landscape
they are automatically derived.
legend text size, default 8
legend text size, default 10
ratio for tiles (default 1, if your raster is not a square the ratio should
be raster::nrow(x) / raster::ncol(x)
)
Five options are available: "viridis - magma" (= "A"), "viridis - inferno" (= "B"), "viridis - plasma" (= "C"), "viridis - viridis" (= "D", the default option), "viridis - cividis" (= "E")
optional arguments to ggplot2::theme
A focused theme to visualize raster data that sets a lot of defaults for the
ggplot2::theme
.
The functions are setup in such a way that you can customize your own one by just wrapping the call and changing the parameters. The theme itself is heavily influenced by hrbrmstr and his package hrbrthemes (https://github.com/hrbrmstr/hrbrthemes/).