Skip to content

Instantly share code, notes, and snippets.

@ATpoint
Created December 19, 2022 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ATpoint/edbbb92309d7cfabf258bbee66a49476 to your computer and use it in GitHub Desktop.
Save ATpoint/edbbb92309d7cfabf258bbee66a49476 to your computer and use it in GitHub Desktop.
A colorblind-friendly palette including gray and black
cb <- c("#E69F00", "#0072B2", "#009E73",
"#CC79A7", "#56B4E9", "#D55E00",
"#661100", "#F0E442", "#332288",
"gray40", "black")
library(ggplot2)
ggplot(data.frame(x=c(rep(c(1,2,3), each=3), 4,4), y=1:length(l), color=LETTERS[1:length(l)]),
aes(x=x, y=y, color=color)) +
geom_point(size=10, show.legend=FALSE) +
scale_color_manual(values=cb) +
theme_bw()
@ATpoint
Copy link
Author

ATpoint commented Dec 19, 2022

cb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment