scale_colour_discrete_knmf: Discrete colour scale with ggKNMF basic palette This scale...

Description Usage Arguments Examples

Description

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.

Usage

 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")

Arguments

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

Examples

 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)

aczepielik/ggKNMF documentation built on June 2, 2019, 2:42 p.m.