Description Usage Arguments Examples
Discrete colour scale with ggKNMF basic palette
This scale maps values of categorical variables onto colours from knmf_colours. All eight colours should be well distinguishable and first six are colour-blind safe.
1 2 3 4 5 6 7 8 9 10 | knmf_palette(start = 1, reverse = FALSE)
scale_colour_discrete_knmf(..., start = 1, reverse = FALSE,
na.value = "grey40")
scale_color_discrete_knmf(..., start = 1, reverse = FALSE,
na.value = "grey40")
scale_fill_discrete_knmf(..., start = 1, reverse = FALSE,
na.value = "grey40")
|
start |
integer from 1 to 8. From Which value of knmf_colours should the scale start taking values. Remember that setting it above one constrains munber of colurs you can use. |
reverse |
logical. If values from knmf_colours should be taken in reverse order. |
... |
Arguments passed on to discrete_scale |
na.value |
Colour for NA |
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
ggplot(mtcars, aes(hp, mpg, colour = as.factor(cyl))) + geom_point() +
scale_colour_discrete_knmf()
## End(Not run)
## Not run:
ggplot(mtcars, aes(x = as.factor(carb), y = ..count.., fill = as.factor(carb))) +
geom_bar() + scale_fill_discrete_knmf()
ggplot(mtcars, aes(hp, fill = as.factor(gear))) +
geom_density(alpha = 0.8) + scale_fill_discrete_knmf()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.