heatmap_legend: Legend theme and appearance tweaking for heatmaps

View source: R/legends.R

heatmap_legendR Documentation

Legend theme and appearance tweaking for heatmaps

Description

Changes to details of how heatmap legends are drawn to better match the rest of the custom theme

Usage

heatmap_legend(plot_scale = 1, font = "Roboto Regular")

Arguments

plot_scale

Scaling factor for the plot components as a whole. A value of 1 corresponds to a font size of 12 pt and a figure size of 6" by 4"

font

Font family to be used in the theme, given as a character vector. The font must be included in the theme fonts; use font_names() to see a list of included fonts and font_preview() to preview a selected font.

Examples

library(ggplot2)

p <- ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
    geom_raster() +
    scale_fill_distiller(palette = "YlGn", guide = heatmap_legend())

christyray/crthemes documentation built on April 14, 2023, 11:18 p.m.