rainbow | R Documentation |
rainbow
is useful for getting a set of colors for graphs when you need
a LOT of colors; there are prettier and more easily distinguishable options
if you only have a couple of comparisons.
rainbow(ncolors)
ncolors |
number of colors desired |
a character vector of colors
# Create a rainbow of 10 colors.
rainbow(10)
# Try using scales::show_col() to visualize the colors, ex:
scales::show_col(rainbow(10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.