plot_rawEMG {musclesyneRgies}R Documentation

Plot raw EMG

Description

Plot raw EMG

Usage

plot_rawEMG(
  x,
  trial,
  plot_time = 3,
  start = 1,
  row_number = NA,
  col_number = 1,
  dark_mode = FALSE,
  line_size = 0.3,
  line_col = "black",
  show_plot = TRUE
)

Arguments

x

Object of class EMG with elements cycles and emg

trial

Character: the name of the considered trial, for archiving purposes

plot_time

How many seconds of data should be plotted?

start

At which data point should the plot start?

row_number

How many rows should the final plot be divided into?

col_number

How many columns should the final plot be divided into?

dark_mode

To enable dark mode

line_size

Line thickness

line_col

Line colour

show_plot

Logical, to decide whether plots should be plotted in the active graphic device

Details

If show_plot is TRUE (default) plots are also shown in the active graphic device. Plots can then be saved with the preferred export method, such as ggplot2::ggsave.

Value

Plots raw EMG trials of the specified length.

Examples

# Load some data
data(RAW_DATA)

# Save a plot with the first (and only) trial in RAW_DATA, first three seconds, in dark mode
plot_rawEMG(RAW_DATA[[1]],
  trial = names(RAW_DATA)[1],
  row_number = 4,
  col_number = 4,
  dark_mode = TRUE,
  line_col = "tomato3",
  show_plot = FALSE
)

[Package musclesyneRgies version 1.2.5 Index]