Skip to contents

Using add_colors() is part of the theme process for a ggm object, which in turn is a visual representation of an egm object. Often, the egm dataset will contain default colors based on where the signal data was brought in from. add_colors() can allow customization of those features to some degree based on opinionated color palettes.

Usage

add_colors(object, palette, mode)

Arguments

object

A ggm object

palette

A character choice from the below options that describe the color choices to be used for plotting. If set to the default, which is NULL, no changes to the colors for individual channels will be performed. If a positive choice is made, then the background mode argument will be set to dark as the default, unless otherwise specified. WARNING: This is an experimental argument, and may be moved in future version.

  • NULL: no changes to the colors will be made. DEFAULT.

  • material: a colorscheme based off of the Material Design color scheme

mode

A character string from c("dark", "light") to describe the base/background color settings to be used. If there are preset channel colors that were exported in the egm object, these colors will be used for the individual channels. If palette is specified, then the dark option will be set automatically (a palette choice cannot be made without understanding the background to plate it across). WARNING: This is an experimental argument, and may be moved in future version.

  • The dark theme mimics the "white on black" scheme seen in LabSystem Pro format (and most other high-contrast visualizations), for minimizing eye strain. This calls the theme_egm_dark() function. DEFAULT.

  • The light theme mimics the "black on white" colors seen in the Prucka system.

  • NULL removes any theme, and uses the default ggplot2::ggplot() settings

Value

Returns an updated ggm object

Details

Currently, the color choices are individual decided based on the channel source (e.g. lead) and are inspired by some modern palettes. The eventual goal for this function is to accept a multitude of palette options using heuristics similar to what is found in {ggplot2} or other graphing packages.