Skip to contents

Helper functions for setting default colors in Acid Genomics plots.

Usage

acid_scale_color_continuous()

acid_scale_fill_continuous()

acid_scale_color_discrete()

acid_scale_fill_discrete()

Value

Scale/ggproto/gg.

Note

Updated 2023-08-11.

Setting default colors

These functions will inherit values defined in global options(). Either input a ggplot2 color scale function that returns Scale class (e.g. acid_scale_color_synesthesia_c), or can input "gradient", "viridis" character strings.

  • acid_scale_color_continuous(): "ggplot2.continuous.colour".

  • acid_scale_color_discrete(): "ggplot2.discrete.colour".

  • acid_scale_fill_continuous(): "ggplot2.continuous.fill".

  • acid_scale_fill_discrete(): "ggplot2.discrete.fill".

See also

  • https://ggplot2.tidyverse.org/reference/scale_colour_continuous.html

  • https://ggplot2.tidyverse.org/reference/scale_colour_discrete.html

Examples

x <- acid_scale_color_continuous()
class(x)
#> [1] "ScaleContinuous" "Scale"           "ggproto"         "gg"             
x <- acid_scale_color_discrete()
class(x)
#> [1] "ScaleDiscrete" "Scale"         "ggproto"       "gg"           
x <- acid_scale_fill_continuous()
class(x)
#> [1] "ScaleContinuous" "Scale"           "ggproto"         "gg"             
x <- acid_scale_fill_discrete()
class(x)
#> [1] "ScaleDiscrete" "Scale"         "ggproto"       "gg"