R/ggplot_colours.R

Defines functions ggplot_colours

Documented in ggplot_colours

#' Get ggplot default colours
#' 
#' @export
ggplot_colours <- function(n=6, h=c(0, 360) +15)
{
  if ((diff(h)%%360) < 1) h[2] <- h[2] - 360/n
  hcl(h = (seq(h[1], h[2], length = n)), c = 100, l = 65)
}
rogiersbart/rtoolz documentation built on Aug. 20, 2020, 2:48 p.m.