Created
June 5, 2019 14:07
-
-
Save joelnitta/3b8bacb85d7fd57070e542cdabb7bd95 to your computer and use it in GitHub Desktop.
preview a color palette
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
preview_pal <- function(colors) { | |
labels <- if(is.null(names(colors))) {colors} else {names(colors)} | |
pie( | |
rep(1, length(colors)), | |
labels = labels, | |
col = colors) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment