Skip to contents

[Experimental]

The ggm() function is used to plot objects of the egm class. This function however is more than just a plotting function - it serves as a visualization tool and confirmation of patterns, annotations, and underlying waveforms in the data. The power of this, instead of being a geom_*() object, is that annotations, intervals, and measurements can be added incrementally.

Usage

ggm(
  data,
  channels = character(),
  time_frame = NULL,
  palette = NULL,
  mode = "dark",
  ...
)

Arguments

data

Data of the egm class, which includes header (meta) and signal information together.

channels

A character vector of which channels to use. Can give either the channel label (e.g "CS 1-2") or the recording device/catheter type (e.g "His" or "ECG"). If no channels are selected, the default is all channels.

time_frame

A time range that should be displaced given in the format of a vector with a length of 2. The left value is the start, and right value is the end time. This is given in seconds (decimals may be used).

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

...

Additional arguments to be passed to the function

Value

An {ggplot2} compatible object with the ggm class, which contains additional elements about the header and annotations of the original data.