add_colorbar

add_colorbar(
  p,
  g,
  width = NULL,
  height = NULL,
  title = NULL,
  space = "right",
  legend.title = element_text(hjust = 0, vjust = 0, size = 14, family = "Times")
)

Arguments

p

a ggplot object

g

a grob object, colorbar

width, height

width and height of the colorbar

title

all title elements: plot, axes, legends (element_text(); inherits from text)

space

one of c("left", "bottom")

legend.title

title of legend (element_text(); inherits from title)