ExtendPalette | R Documentation |
The colors in the returned palette are always in the same order
ExtendPalette(n = NULL, base = "Set1")
n |
The number of desired colors in the palette |
base |
The name of the palette of the package RColorBrewer from which the extended palette is built. Default value is 'Set1'. |
A vector composed of n color code.
Samuel Wieczorek
ExtendPalette(12) nPalette <- 10 par(mfrow=c(nPalette,1)) par(mar=c(0.5, 4.5, 0.5, 0.5)) for (i in 1:nPalette){ pal <- ExtendPalette(n=i, base = 'Dark2') barplot(1:length(pal), col=pal) print(pal) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.