View source: R/discrete-gephi.R
| pal_gephi | R Documentation |
Generative discrete color palettes adapted from the palette engine in Gephi. These palettes are designed to generate visually distinct colors for an arbitrary number of categories.
pal_gephi(palette = gephi_palettes(), alpha = 1)
palette |
Palette type. See |
alpha |
Transparency level, a real number in (0, 1].
See |
The Gephi palette generator uses the current R random number state directly.
If you need reproducible results, call base::set.seed() before creating
a palette or evaluating the scale. To isolate RNG side effects, consider
using withr::with_seed().
library("scales")
set.seed(42)
show_col(pal_gephi("default")(10))
show_col(pal_gephi("fancy_light")(20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.