add_colorbar.Rdadd_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")
)a ggplot object
a grob object, colorbar
width and height of the colorbar
all title elements: plot, axes, legends (element_text();
inherits from text)
one of c("left", "bottom")
title of legend (element_text(); inherits from
title)