synesthesia: Synesthesia color palette

Description Usage Arguments Details Value Note See Also Examples

View source: R/palettes-synesthesia.R

Description

Four color gradient defined by purple, blue, green, orange.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
synesthesia(
  n = 256L,
  palette = c("lightPalette", "darkPalette", "draculaPalette", "macOSLightPalette",
    "macOSDarkPalette", "iOSLightPalette", "iOSDarkPalette")
)

synesthesia_pal(
  palette = c("lightPalette", "darkPalette", "draculaPalette", "macOSLightPalette",
    "macOSDarkPalette", "iOSLightPalette", "iOSDarkPalette")
)

scale_colour_synesthesia_c(
  ...,
  na.value = "grey50",
  guide = "colourbar",
  palette = c("lightPalette", "darkPalette", "draculaPalette", "macOSLightPalette",
    "macOSDarkPalette", "iOSLightPalette", "iOSDarkPalette")
)

scale_color_synesthesia_c(
  ...,
  na.value = "grey50",
  guide = "colourbar",
  palette = c("lightPalette", "darkPalette", "draculaPalette", "macOSLightPalette",
    "macOSDarkPalette", "iOSLightPalette", "iOSDarkPalette")
)

scale_colour_synesthesia_d(
  ...,
  palette = c("lightPalette", "darkPalette", "draculaPalette", "macOSLightPalette",
    "macOSDarkPalette", "iOSLightPalette", "iOSDarkPalette")
)

scale_color_synesthesia_d(
  ...,
  palette = c("lightPalette", "darkPalette", "draculaPalette", "macOSLightPalette",
    "macOSDarkPalette", "iOSLightPalette", "iOSDarkPalette")
)

scale_fill_synesthesia_c(
  ...,
  na.value = "grey50",
  guide = "colourbar",
  palette = c("lightPalette", "darkPalette", "draculaPalette", "macOSLightPalette",
    "macOSDarkPalette", "iOSLightPalette", "iOSDarkPalette")
)

scale_fill_synesthesia_d(
  ...,
  palette = c("lightPalette", "darkPalette", "draculaPalette", "macOSLightPalette",
    "macOSDarkPalette", "iOSLightPalette", "iOSDarkPalette")
)

Arguments

n

integer(1). The number of colors (>= 1) to be in the palette.

palette

character(1). Color palette name.

...

Additional arguments.

na.value

character(1). Missing values will be replaced with this value.

guide

character(1) or function. A function used to create a guide or its name. See guides() for details.

Details

A little bit of an acid trip, especially when used for heatmaps.

Value

character or ggproto.

Note

Updated 2019-09-13.

See Also

Adapted from viridis color palette:

Useful color palette URLs:

Additional color palette functions that may be relevant:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
library(ggplot2)
theme_set(acid_theme_light())

## Color, continuous.
cc <- ggplot(mpg, aes(cty, hwy)) + geom_jitter(aes(color = hwy))
cc + scale_color_synesthesia_c()

## Color, discrete.
cd <- ggplot(mpg, aes(fl)) + geom_bar(aes(color = fl), fill = NA)
cd + scale_color_synesthesia_d()

## Fill, continuous.
fc <- ggplot(diamonds, aes(carat, price)) + geom_hex()
fc + scale_fill_synesthesia_c()

## Fill, discrete.
fd <- ggplot(mpg, aes(fl)) + geom_bar(aes(fill = fl))
fd + scale_fill_synesthesia_d()

## Base color.
par(mar = rep(2.5, times = 4L))
image(
    matrix(data = seq_len(100L), nrow = 10, ncol = 10),
    col = synesthesia()
)

acidgenomics/acidplots documentation built on July 25, 2020, 4:03 p.m.