knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", dpi=300 )
An R package for generating color palettes using Halton sequences in CIE Lab* color space. Based on halpal.py by John Wiedenhoeft.
To install from GitHub:
require(remotes) remotes::install_github("benjaminrich/HalPalR")
library(HalPalR) library(ggplot2) n <- 20 barplot(rep(1, n), col=halpal(n), space=0, border=NA, axes=FALSE) n <- 20 set.seed(123) intercept <- runif(n, -5, 5) slope <- -(intercept/5)*runif(n, 0, 1) dat <- expand.grid(ID=paste0("ID:", 1:n), x=1:10) dat$y <- intercept + dat$x*slope + runif(nrow(dat), 0, 3) ggplot(dat, aes(x=x, y=y, color=ID)) + geom_line(size=1) + scale_color_halpal() + theme_bw()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.